Error building package
ssshojaei opened this issue · 1 comments
ssshojaei commented
➜ npm run package
> locky@0.0.1 package /home/saleh/Projects/open_sources/locky/locky_desktop
> npm run build
> locky@0.0.1 build /home/saleh/Projects/open_sources/locky/locky_desktop
> cross-env NODE_ENV=production webpack --config webpack.build.config.js --mode production
Hash: 9f5a6cf59b0e19e4ddc5
Version: webpack 4.44.0
Time: 4591ms
Built at: 07/29/2020 8:57:26 PM
2 assets
Entrypoint main = bundle.css main.js
ERROR in unknown: Unexpected token (22748:6)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! locky@0.0.1 build: `cross-env NODE_ENV=production webpack --config webpack.build.config.js --mode production`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the locky@0.0.1 build 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! /home/saleh/.npm/_logs/2020-07-29T16_27_26_936Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! locky@0.0.1 package: `npm run build`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the locky@0.0.1 package 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! /home/saleh/.npm/_logs/2020-07-29T16_27_27_111Z-debug.log
alexdevero commented
@ssshojaei I tried running npm run build
and the app was build successfully.
$ npm run build
> electron-react-webpack-boilerplate@1.12.1 build X:\temp\electron-react-webpack-boilerplate
> cross-env NODE_ENV=production webpack --config webpack.build.config.js --mode production
Hash: fd3feecde88d37ba9244
Version: webpack 4.44.0
Time: 9760ms
Built at: 30. 07. 2020 8:03:19
Asset Size Chunks Chunk Names
bundle.css 478 bytes 0 [emitted] main
index.html 241 bytes [emitted]
main.js 128 KiB 0 [emitted] main
Entrypoint main = bundle.css main.js
Try this:
- Delete
node_modules
folder andyarn.lock
file (orpackage-lock.json
) and re-install dependencies. Then, try runningnpm run build
again. - Ensure your js or css don't contain any syntax errors.