Получение ошибки, в то время как 'npm выполненная сборка'

Какова может быть проблема?

> @ build /home/mafia/repo
> npm run build:src && npm run build:test


> @ build:src /home/mafia/repo
> babel src/main/webapp/js/ -x ".es6" -d src/main/webapp/js/

Error: Cannot find module 'electron-to-chromium' (While processing preset: "/home/mafia/repo/node_modules/babel-preset-env/lib/index.js")
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/mafia/repo/node_modules/babel-preset-env/lib/normalize-options.js:11:27)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

npm ERR! Linux 4.4.0-71-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build:src"
npm ERR! node v7.8.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ build:src: `babel src/main/webapp/js/ -x ".es6" -d src/main/webapp/js/`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ build:src script 'babel src/main/webapp/js/ -x ".es6" -d src/main/webapp/js/'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     babel src/main/webapp/js/ -x ".es6" -d src/main/webapp/js/
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls 
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/mafia/.npm/_logs/2017-04-09T18_06_55_612Z-debug.log

npm ERR! Linux 4.4.0-71-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v7.8.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ build: `npm run build:src && npm run build:test`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ build script 'npm run build:src && npm run build:test'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run build:src && npm run build:test
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs 
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls 
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/mafia/.npm/_logs/2017-04-09T18_06_55_684Z-debug.log
0
задан 9 April 2017 в 11:10

1 ответ

Ваш вопрос, кажется, не о Ubuntu, но является скорее общим вопросом о программировании.

Однако при фактическом рассмотрении вывода Вы определили бы строку Cannot find module 'electron-to-chromium' там, который ясно указывает, что Ваш проект пропускает модуль электрон к хрому как зависимость.

необходимо смочь установить его путем выполнения команды ниже внутренней части каталог проекта, который также добавляет модуль к списку зависимостей в Вашем package.json:

npm install --save electron-to-chromium
1
ответ дан 3 November 2019 в 11:56

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

Похожие вопросы: