Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Первый запуск npm start выдает ошибку #105

Open
AndreyGudin opened this issue Aug 7, 2021 · 7 comments
Open

Первый запуск npm start выдает ошибку #105

AndreyGudin opened this issue Aug 7, 2021 · 7 comments

Comments

@AndreyGudin
Copy link

  1. Установил по гайду в Read.me
  2. При запуске npm start без всяких изменений выдает ошибку
npm start

> NTH-start-project@4.1.0 start C:\metalamp-hotel\metalamp-hotel
> gulp

C:\metalamp-hotel\metalamp-hotel\node_modules\del\node_modules\globby\index.js:28
        } catch {
                ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\metalamp-hotel\metalamp-hotel\node_modules\del\index.js:4:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! NTH-start-project@4.1.0 start: `gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the NTH-start-project@4.1.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!     C:\Users\Andrey\AppData\Roaming\npm-cache\_logs\2021-08-07T15_39_01_612Z-debug.log

VSCode:
Версия: 1.59.0 (user setup)
Фиксация: 379476f0e13988d90fab105c5c19e7abc8b1dea8
Дата: 2021-08-04T23:13:12.822Z
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
ОС: Windows_NT x64 10.0.17134

@nicothin
Copy link
Owner

Странно.
Какой терминал использован?

Попробовал в баше (внутри WSL, Убунта), поставилось и запустилось.

@npofopr
Copy link

npofopr commented Aug 12, 2021

Можно ещё попробовать gulp глобально поставить. Правда ошибка обычно при этом другая.

@AndreyGudin
Copy link
Author

Терминал - bash в VSCode. Команда npm - i пишет, что все зависимости стоят.

@nicothin
Copy link
Owner

Терминал - bash в VSCode. Команда npm - i пишет, что все зависимости стоят.

Так а что за баш-то?
В винде по умолчанию баша нет.

Я попробовал с гитбашем, установленным в винду, обновив ноду до 14.17.5 и, опять-таки, у меня всё получилось и установить, и запустить.

Попробуйте грохнуть зависимости, поставить заново и запустить (что-то типа rm -rf node_modules && npm i && npm start).

@AndreyGudin
Copy link
Author

Терминал, встроенный в VSCode. Попробую.

@AndreyGudin
Copy link
Author

AndreyGudin commented Aug 18, 2021

Результат команды

@DESKTOP /c/metalamp2
$ rm -rf node_modules && npm i && npm start

> node-sass@4.14.1 install C:\metalamp2\node_modules\node-sass
> node scripts/install.js

Cached binary found at C:\Users\Andrey\AppData\Roaming\npm-cache\node-sass\4.14.1\win32-x64-57_binding.node

> husky@4.3.8 install C:\metalamp2\node_modules\husky
> node husky install

Husky requires Node 10 (runtime: v8.11.4), skipping Git hooks installation.

> core-js@2.6.12 postinstall C:\metalamp2\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> node-sass@4.14.1 postinstall C:\metalamp2\node_modules\node-sass
> node scripts/build.js

Binary found at C:\metalamp2\node_modules\node-sass\vendor\win32-x64-57\binding.node
Testing binary
Binary is fine

> gifsicle@5.1.0 postinstall C:\metalamp2\node_modules\gifsicle
> node lib/install.js

  √ gifsicle pre-build test passed successfully

> mozjpeg@6.0.1 postinstall C:\metalamp2\node_modules\mozjpeg
> node lib/install.js

  √ mozjpeg pre-build test passed successfully

> optipng-bin@6.0.0 postinstall C:\metalamp2\node_modules\optipng-bin
> node lib/install.js

  √ optipng pre-build test passed successfully

> husky@4.3.8 postinstall C:\metalamp2\node_modules\husky
> opencollective-postinstall || exit 0

Thank you for using husky!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/husky/donate

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\watchpack-chokidar2\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\glob-watcher\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1988 packages in 77.847s

> NTH-start-project@4.1.0 start C:\metalamp2
> gulp

C:\metalamp2\node_modules\del\node_modules\globby\index.js:28
        } catch {
                ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\metalamp2\node_modules\del\index.js:4:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! NTH-start-project@4.1.0 start: `gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the NTH-start-project@4.1.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!     C:\Users\\AppData\Roaming\npm-cache\_logs\2021-08-18T17_10_55_955Z-debug.log

@nicothin
Copy link
Owner

Да, увы, то же самое после переустановки зависимостей :(
Ошибку вызывает сторонний пакет del. Возможно, имеет смысл поставить более старую версию этого пакета, предварительно удалив текущую.
Что-то типа npm uninstall del && npm install -D del@5.1.0 и потом пробовать запустить.
Гарантий, впрочем, никаких :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants