I'm having a challenge with a Node application that wont start on one server, but it starts just fine on another server. I thought they were identical, but clearly something is different and I can't figure out what.
SETUP:
Both using Node 14.18.2 (yes I know its older, but can't upgrade right now)
NPM version is 6.14.15
Next.js 11.1.2
We are using PM2 to start the application, although I don't believe the issue is related to PM2.
Typical build and start routine:
* npm install
* npm next build
* pm2 start ecosystem.js
The build runs just fine, but when starting up node on one server, the npm log shows this error:
But it works on the other server. I even verified the versions of all the libraries using "npm list". Dump the output from both servers to a file and ran a diff. All versions of all libraries are identical.
I'm a bit stuck. Any assistance on what this might be or where to look next?
Thanks!
SETUP:
Both using Node 14.18.2 (yes I know its older, but can't upgrade right now)
NPM version is 6.14.15
Next.js 11.1.2
We are using PM2 to start the application, although I don't believe the issue is related to PM2.
Typical build and start routine:
* npm install
* npm next build
* pm2 start ecosystem.js
The build runs just fine, but when starting up node on one server, the npm log shows this error:
Code:
9 verbose lifecycle [email protected]~start: CWD: /var/www/app-name/135904dbe0f8c312a65e175671a6d2d5b165afa6
10 silly lifecycle [email protected]~start: Args: [ '-c', 'next start' ]
11 silly lifecycle [email protected]~start: Returned: code: 1 signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `next start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/home/ubuntu/.nvm/versions/node/v14.18.2/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:400:28)
13 verbose stack at ChildProcess.<anonymous> (/home/ubuntu/.nvm/versions/node/v14.18.2/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:400:28)
13 verbose stack at maybeClose (internal/child_process.js:1058:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
But it works on the other server. I even verified the versions of all the libraries using "npm list". Dump the output from both servers to a file and ran a diff. All versions of all libraries are identical.
I'm a bit stuck. Any assistance on what this might be or where to look next?
Thanks!