Error starting npm

Hello,

Im am totaly stuck in chapter 1! I am get error when i try start ‘npm’

Log file content:
0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/bin/node’, ‘/usr/bin/npm’, ‘start’ ]
2 info using npm@6.9.0
3 info using node@v10.16.3
4 verbose run-script [ ‘prestart’, ‘start’, ‘poststart’ ]
5 info lifecycle server@1.0.0~prestart: server@1.0.0
6 info lifecycle server@1.0.0~start: server@1.0.0
7 verbose lifecycle server@1.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle server@1.0.0~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/m$
9 verbose lifecycle server@1.0.0~start: CWD: /home/mindaugas/Documents/MongoDB courses/M220JS/Chapter 1/mflix-js
10 silly lifecycle server@1.0.0~start: Args: [ ‘-c’, ‘nodemon -L ./index.js’ ]
11 info lifecycle server@1.0.0~start: Failed to exec start script
12 verbose stack Error: server@1.0.0 start: nodemon -L ./index.js
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:$
12 verbose stack at ChildProcess.emit (events.js:198:13)
12 verbose stack at maybeClose (internal/child_process.js:982:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
13 verbose pkgid server@1.0.0
14 verbose cwd /home/mindaugas/Documents/MongoDB courses/M220JS/Chapter 1/mflix-js
15 verbose Linux 4.15.0-58-generic
16 verbose argv “/usr/bin/node” “/usr/bin/npm” “start”
17 verbose node v10.16.3
18 verbose npm v6.9.0
19 error file sh
20 error code ELIFECYCLE
21 error errno ENOENT
22 error syscall spawn
23 error server@1.0.0 start: nodemon -L ./index.js
23 error spawn ENOENT
24 error Failed at the server@1.0.0 start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

After reinstall nodejs i am get next error when starting npm:

Log file content:
0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/bin/node’, ‘/usr/bin/npm’, ‘start’ ]
2 info using npm@6.9.0
3 info using node@v10.16.3
4 verbose run-script [ ‘prestart’, ‘start’, ‘poststart’ ]
5 info lifecycle server@1.0.0~prestart: server@1.0.0
6 info lifecycle server@1.0.0~start: server@1.0.0
7 verbose lifecycle server@1.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle server@1.0.0~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/mindaugas/Documents/MongoDB courses/M220JS/Chapter 1/mflix-js/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
9 verbose lifecycle server@1.0.0~start: CWD: /home/mindaugas/Documents/MongoDB courses/M220JS/Chapter 1/mflix-js
10 silly lifecycle server@1.0.0~start: Args: [ ‘-c’, ‘nodemon -L ./index.js’ ]
11 info lifecycle server@1.0.0~start: Failed to exec start script
12 verbose stack Error: server@1.0.0 start: nodemon -L ./index.js
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:198:13)
12 verbose stack at maybeClose (internal/child_process.js:982:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
13 verbose pkgid server@1.0.0
14 verbose cwd /home/mindaugas/Documents/MongoDB courses/M220JS/Chapter 1/mflix-js
15 verbose Linux 4.15.0-58-generic
16 verbose argv “/usr/bin/node” “/usr/bin/npm” “start”
17 verbose node v10.16.3
18 verbose npm v6.9.0
19 error file sh
20 error code ELIFECYCLE
21 error errno ENOENT
22 error syscall spawn
23 error server@1.0.0 start: nodemon -L ./index.js
23 error spawn ENOENT
24 error Failed at the server@1.0.0 start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

OS: Linux Mint 19.2
NodeJs: 10.16.3
Npm: 6.9.0

It is necessary to keep directory names!!!

~/courses/M220JS/Chapter/mflix-js/

finally, everything is working now :slight_smile: