Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Первый запуск 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

> [email protected] 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! [email protected] start: `gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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

> [email protected] 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

> [email protected] install C:\metalamp2\node_modules\husky
> node husky install

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

> [email protected] 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 -)


> [email protected] 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

> [email protected] postinstall C:\metalamp2\node_modules\gifsicle
> node lib/install.js

  √ gifsicle pre-build test passed successfully

> [email protected] postinstall C:\metalamp2\node_modules\mozjpeg
> node lib/install.js

  √ mozjpeg pre-build test passed successfully

> [email protected] postinstall C:\metalamp2\node_modules\optipng-bin
> node lib/install.js

  √ optipng pre-build test passed successfully

> [email protected] 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: [email protected] (node_modules\watchpack-chokidar2\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\glob-watcher\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1988 packages in 77.847s

> [email protected] 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! [email protected] start: `gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 [email protected] и потом пробовать запустить.
Гарантий, впрочем, никаких :(

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

No branches or pull requests

3 participants