Yes
Yes
ELIFECYCLE, react-scripts build
node -v
: v8.0.0npm -v
: 5.0.0yarn --version
(if you use Yarn): NAnpm ls react-scripts
(if you haven’t ejected): [email protected]
Then, specify:
- Operating system: Ubuntu 16, Zorin OS 12.1
- Browser and version (if relevant): NA
- create a fresh app using create-react-app and
$ npm install --save node-thermal-printer
- add the line
import 'node-thermal-printer'
insrc/index.js
$ npm run build
Successful Build.
Failed to compile with error code ELIFECYCLE, errno 1
Terminal
$ npm run build
[email protected] build /home/andro/smartd.workspace/pos-space/sample-printer react-scripts build
Creating an optimized production build... Failed to compile.
static/js/main.47fb6eaa.js from UglifyJs Unexpected token: name (i) [./~/node-thermal-printer/node-thermal-printer.js:403,0][static/js/main.47fb6eaa.js:20938,12]
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] build:
react-scripts build
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] 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/andro/.npm/_logs/2017-06-27T16_14_58_135Z-debug.log
https://github.com/rambabusaravanan/error-create-react-app
checkout the latest commit and npm install
and perform npm run build
I'm building a cross-platform desktop app using electron and react and I'm using npm package 'node-thermal-printer' for usb thermal printer. The printer code works fine in the places where react-scripts build
doesn't involve like
- static .js (public folder) and linked to index.html (renderer process)
- electron's main process (main.js)
But the code fails, when I add the same code in src/index.js
where react-scripts build
failed with error code ELIFECYCLE, errno 1