Ошибка запуска npm с кодом выхода 126

Поэтому я работаю над курсом по Pluralsight, в котором есть папка с файлами, необходимыми для курса. Часть курса требует от меня установки и запуска npm. Это установило с несколькими проблемами, которые потребовали, чтобы я выполнил исправление аудита npm. Проблемы с зависимостями устранены, но у меня все еще есть проблемы с запуском npm. Ниже приведен ответ консоли после запуска npm start, после которого, разделенные хеш-тегами, находится копия вывода журнала. Кто-нибудь сталкивался с этим и / или кто-нибудь может помочь с этим?

###################################################
s/demos$ npm start

> html5-fundamentals@1.0.0 start /Users/briensmarandache/Atom_Projects/Pluralsight/HTML5/html5-fundamentals/demos
> http-server -o

sh: /Users/briensmarandache/Atom_Projects/Pluralsight/HTML5/html5-fundamentals/demos/node_modules/.bin/http-server: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! html5-fundamentals@1.0.0 start: `http-server -o`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the html5-fundamentals@1.0.0 start 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!     /Users/briensmarandache/.npm/_logs/2019-04-23T22_39_37_214Z-debug.log

###################################################
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm@6.4.1
3 info using node@v10.15.3
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle html5-fundamentals@1.0.0~prestart: html5-fundamentals@1.0.0
6 info lifecycle html5-fundamentals@1.0.0~start: html5-fundamentals@1.0.0
7 verbose lifecycle html5-fundamentals@1.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle html5-fundamentals@1.0.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/briensmarandache/Atom_Projects/Pluralsight/HTML5/html5-fundamentals/demos/node_modules/.bin:/Users/briensmarandache/.rbenv/shims:/Users/briensmarandache/.rbenv/bin:/usr/local/mysql/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
9 verbose lifecycle html5-fundamentals@1.0.0~start: CWD: /Users/briensmarandache/Atom_Projects/Pluralsight/HTML5/html5-fundamentals/demos
10 silly lifecycle html5-fundamentals@1.0.0~start: Args: [ '-c', 'http-server -o' ]
11 silly lifecycle html5-fundamentals@1.0.0~start: Returned: code: 126  signal: null
12 info lifecycle html5-fundamentals@1.0.0~start: Failed to exec start script
13 verbose stack Error: html5-fundamentals@1.0.0 start: `http-server -o`
13 verbose stack Exit status 126
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:189:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:189:13)
13 verbose stack     at maybeClose (internal/child_process.js:970:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid html5-fundamentals@1.0.0
15 verbose cwd /Users/briensmarandache/Atom_Projects/Pluralsight/HTML5/html5-fundamentals/demos
16 verbose Darwin 18.5.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v10.15.3
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 126
22 error html5-fundamentals@1.0.0 start: `http-server -o`
22 error Exit status 126
23 error Failed at the html5-fundamentals@1.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 126, true ]

1 ответ

С некоторой помощью этого комментария https://stackoverflow.com/a/59818130/3896144

Там написано, что скрипт должен иметь права на исполняемый файл, в моем случае это сработало.

Другие вопросы по тегам