You might be running out of memory. Try to increase your RAM or add a swapfile.
Npm production failing
I have moved my site to a digital ocean server and now I am trying to get everything working properly. Npm is giving me a headache though, run dev and run watch work fine but when I run prod it gets to 91%, hangs for awhile and then fails with a very unclear reason. Is there anything I have missed to set it up properly?
Error log:
0 info it worked if it ends with ok
1 verbose cli [ '/root/.nvm/versions/node/v10.6.0/bin/node',
1 verbose cli '/root/.nvm/versions/node/v10.6.0/bin/npm',
1 verbose cli 'run',
1 verbose cli 'prod' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preprod', 'prod', 'postprod' ]
5 info lifecycle @~preprod: @
6 info lifecycle @~prod: @
7 verbose lifecycle @~prod: unsafe-perm in lifecycle true
8 verbose lifecycle @~prod: PATH: /root/.nvm/versions/node/v10.6.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-$
9 verbose lifecycle @~prod: CWD: /var/www/laravel
10 silly lifecycle @~prod: Args: [ '-c', 'npm run production' ]
11 silly lifecycle @~prod: Returned: code: 1 signal: null
12 info lifecycle @~prod: Failed to exec prod script
13 verbose stack Error: @ prod: npm run production
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/root/.nvm/versions/node/v10.6.0/lib/node_modules/npm/node_modules/npm-lif$
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess. (/root/.nvm/versions/node/v10.6.0/lib/node_modules/npm/node_modules/npm-lif$
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:961:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
14 verbose pkgid @
15 verbose cwd /var/www/laravel
16 verbose Linux 4.4.0-130-generic
17 verbose argv "/root/.nvm/versions/node/v10.6.0/bin/node" "/root/.nvm/versions/node/v10.6.0/bin/npm" "run" "prod"
18 verbose node v10.6.0
19 verbose npm v6.1.0
20 error code ELIFECYCLE
21 error errno 1
22 error @ prod: npm run production
22 error Exit status 1
23 error Failed at the @ prod script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
Please or to participate in this conversation.