JsCommunity / jsonrpc-websocket-client

JSON-RPC 2 over WebSocket
6 stars 1 forks source link

get errors when run rpm run build #39

Closed yingfangdu closed 6 years ago

yingfangdu commented 6 years ago

Hi, I use jsonrpc-websocket-client in my code, and when I run 'rpm run build', I got this error:

bae-electron@0.1.0 build E:\Repos\BAE\src\electron\htmlui react-scripts build && npm run release

Creating an optimized production build... Failed to compile.

Failed to minify the code from this file:

    ./node_modules/json-rpc-protocol/dist/errors.js:89

Read more here: http://bit.ly/2tRViJ9

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! bae-electron@0.1.0 build: react-scripts build && npm run release npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bae-electron@0.1.0 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! C:\Users\yingfand\AppData\Roaming\npm-cache_logs\2018-04-30T22_24_41_573Z-debug.log

The complete log is like this: info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'build' ] 2 info using npm@5.6.0 3 info using node@v10.0.0 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ] 5 info lifecycle bae-electron@0.1.0~prebuild: bae-electron@0.1.0 6 info lifecycle bae-electron@0.1.0~build: bae-electron@0.1.0 7 verbose lifecycle bae-electron@0.1.0~build: unsafe-perm in lifecycle true 8 verbose lifecycle bae-electron@0.1.0~build: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\Repos\BAE\src\electron\htmlui\node_modules.bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\Hewlett-Packard\HP Performance Advisor;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Magellan Toolset 4.75\;C:\Users\yingfand\AppData\Local\Temp\pipe;C:\Program Files (x86)\Yarn\bin;C:\Program Files\nodejs\;C:\ClientGoldEnlistment;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE;C:\MyBatches;C:\Users\yingfand\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft VS Code\bin;C:\Users\yingfand\AppData\Local\GitHubDesktop\bin;E:\Repos\CEF\depot_tools;C:\Users\yingfand\AppData\Local\Yarn\bin;C:\Program Files (x86)\Yarn\bin;C:\Users\yingfand\AppData\Roaming\npm 9 verbose lifecycle bae-electron@0.1.0~build: CWD: E:\Repos\BAE\src\electron\htmlui 10 silly lifecycle bae-electron@0.1.0~build: Args: [ '/d /s /c', 'react-scripts build && npm run release' ] 11 silly lifecycle bae-electron@0.1.0~build: Returned: code: 1 signal: null 12 info lifecycle bae-electron@0.1.0~build: Failed to exec build script 13 verbose stack Error: bae-electron@0.1.0 build: react-scripts build && npm run release 13 verbose stack Exit status 1 13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16) 13 verbose stack at EventEmitter.emit (events.js:182:13) 13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:182:13) 13 verbose stack at maybeClose (internal/child_process.js:947:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:236:5) 14 verbose pkgid bae-electron@0.1.0 15 verbose cwd E:\Repos\BAE\src\electron\htmlui 16 verbose Windows_NT 10.0.16299 17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build" 18 verbose node v10.0.0 19 verbose npm v5.6.0 20 error code ELIFECYCLE 21 error errno 1 22 error bae-electron@0.1.0 build: react-scripts build && npm run release 22 error Exit status 1 23 error Failed at the bae-electron@0.1.0 build script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

julien-f commented 6 years ago

It looks like your minifier does not support ES6, you should check out uglify-es.

yingfangdu commented 6 years ago

thanks very much. I am building react app which won't support ES 6. It looks like I cannot use this package then.

julien-f commented 6 years ago

That's unfortunate because more and more packages are using ES6-ES2017…

Good luck to you.