The problem is that when changes are made, the expectation is that the app will rebuild and allow for quick / easy testing of the changes.
Instead, what happens is that the build regularly fails and node crashes. Example output from node:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! community-app@1.0.0 dev: `cross-env BABEL_ENV=development NODE_ENV=development node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the community-app@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/jmgasper/.npm/_logs/2023-03-19T00_33_48_862Z-debug.log
And example log output:
jmgasper@justin-ca gigs_to_challenge_listing ~/git/community-app cat /home/jmgasper/.npm/_logs/2023-03-19T00_33_48_862Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/home/jmgasper/.nvm/versions/node/v8.11.2/bin/node',
1 verbose cli '/home/jmgasper/.nvm/versions/node/v8.11.2/bin/npm',
1 verbose cli 'run',
1 verbose cli 'dev' ]
2 info using npm@5.6.0
3 info using node@v8.11.2
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle community-app@1.0.0~predev: community-app@1.0.0
6 info lifecycle community-app@1.0.0~dev: community-app@1.0.0
7 verbose lifecycle community-app@1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle community-app@1.0.0~dev: PATH: /home/jmgasper/.nvm/versions/node/v8.11.2/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/jmgasper/git/community-app/node_modules/.bin:/home/jmgasper/.nvm/versions/node/v8.11.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle community-app@1.0.0~dev: CWD: /home/jmgasper/git/community-app
10 silly lifecycle community-app@1.0.0~dev: Args: [ '-c',
10 silly lifecycle 'cross-env BABEL_ENV=development NODE_ENV=development node ./bin/www' ]
11 silly lifecycle community-app@1.0.0~dev: Returned: code: 1 signal: null
12 info lifecycle community-app@1.0.0~dev: Failed to exec dev script
13 verbose stack Error: community-app@1.0.0 dev: `cross-env BABEL_ENV=development NODE_ENV=development node ./bin/www`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/home/jmgasper/.nvm/versions/node/v8.11.2/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (/home/jmgasper/.nvm/versions/node/v8.11.2/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid community-app@1.0.0
15 verbose cwd /home/jmgasper/git/community-app
16 verbose Linux 5.19.0-35-generic
17 verbose argv "/home/jmgasper/.nvm/versions/node/v8.11.2/bin/node" "/home/jmgasper/.nvm/versions/node/v8.11.2/bin/npm" "run" "dev"
18 verbose node v8.11.2
19 verbose npm v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error community-app@1.0.0 dev: `cross-env BABEL_ENV=development NODE_ENV=development node ./bin/www`
22 error Exit status 1
23 error Failed at the community-app@1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Expected behavior
When using npm run dev, the expectation is that local changes will cause a quick rebuild for easy testing, and that node will continue to run
Describe the bug
Testing the documentation here on Ubuntu 22:
https://platform-ui.topcoder.com/dev-center/getting-started
The app installs and runs fine.
The problem is that when changes are made, the expectation is that the app will rebuild and allow for quick / easy testing of the changes.
Instead, what happens is that the build regularly fails and node crashes. Example output from node:
And example log output:
Expected behavior When using
npm run dev
, the expectation is that local changes will cause a quick rebuild for easy testing, and that node will continue to run