Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Bad error code when running npm install: 1 | Linux Mint #174

Open
sotrh opened this issue Oct 11, 2020 · 0 comments
Open

Error: Bad error code when running npm install: 1 | Linux Mint #174

sotrh opened this issue Oct 11, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@sotrh
Copy link

sotrh commented Oct 11, 2020

I'm trying to create a rust webpack project. I run the npm init rust-webpack my-app and I get the following error.

npm init rust-webpack rust-nuxt
npx: installed 17 in 2.454s
 🦀 Rust + 🕸 WebAssembly + Webpack = ❤️ 
/home/benjamin/.npm/_npx/6993/lib/node_modules/create-rust-webpack/.bin/create-rust-webpack.js:17
    throw new Error("Bad error code when running `" + cmd + " " + args.join(" ") + "`: " + output.status);
    ^

Error: Bad error code when running `npm install`: 1
    at run (/home/benjamin/.npm/_npx/6993/lib/node_modules/create-rust-webpack/.bin/create-rust-webpack.js:17:11)
    at /home/benjamin/.npm/_npx/6993/lib/node_modules/create-rust-webpack/.bin/create-rust-webpack.js:46:5
    at /home/benjamin/.npm/_npx/6993/lib/node_modules/create-rust-webpack/node_modules/cpr/lib/index.js:294:33
    at check (/home/benjamin/.npm/_npx/6993/lib/node_modules/create-rust-webpack/node_modules/cpr/lib/index.js:190:17)
    at copy (/home/benjamin/.npm/_npx/6993/lib/node_modules/create-rust-webpack/node_modules/cpr/lib/index.js:198:24)
    at processTicksAndRejections (internal/process/task_queues.js:82:9)
(base) benjamin@sotrh-top:~/Desktop$ rm -rf rust-nuxt/
(base) benjamin@sotrh-top:~/Desktop$ npm init rust-webpack rust-nuxt --verbose
npm info it worked if it ends with ok
npm verb cli [
npm verb cli   '/home/benjamin/.nvm/versions/node/v12.4.0/bin/node',
npm verb cli   '/home/benjamin/.nvm/versions/node/v12.4.0/bin/npm',
npm verb cli   'init',
npm verb cli   'rust-webpack',
npm verb cli   'rust-nuxt',
npm verb cli   '--verbose'
npm verb cli ]
npm info using npm@6.14.0
npm info using node@v12.4.0
npx: installed 17 in 2.744sfo using node@v12.4.0
 🦀 Rust + 🕸 WebAssembly + Webpack = ❤️ e@v12.4.0
/home/benjamin/.npm/_npx/7091/lib/node_modules/create-rust-webpack/.bin/create-rust-webpack.js:17
    throw new Error("Bad error code when running `" + cmd + " " + args.join(" ") + "`: " + output.status);
    ^

Error: Bad error code when running `npm install`: 1
    at run (/home/benjamin/.npm/_npx/7091/lib/node_modules/create-rust-webpack/.bin/create-rust-webpack.js:17:11)
    at /home/benjamin/.npm/_npx/7091/lib/node_modules/create-rust-webpack/.bin/create-rust-webpack.js:46:5
    at /home/benjamin/.npm/_npx/7091/lib/node_modules/create-rust-webpack/node_modules/cpr/lib/index.js:294:33
    at check (/home/benjamin/.npm/_npx/7091/lib/node_modules/create-rust-webpack/node_modules/cpr/lib/index.js:190:17)
    at copy (/home/benjamin/.npm/_npx/7091/lib/node_modules/create-rust-webpack/node_modules/cpr/lib/index.js:198:24)
    at processTicksAndRejections (internal/process/task_queues.js:82:9)
npm verb exit [ 0, true ]
npm timing npm Completed in 15283ms
npm info ok 

The script does create the files for the project, but when I run npm install I get the following.

npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm ERR! Unexpected end of JSON input while parsing near '...istry.npmjs.org/webpa'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/benjamin/.npm/_logs/2020-10-11T05_26_15_417Z-debug.log

I've attached the log mentioned.

2020-10-11T05_26_15_417Z-debug.log

Here's some info about my machine.

rustup 1.22.1 (b01adbbc3 2020-07-08)
rustc 1.46.0 (04488afe3 2020-08-24)
cargo 1.46.0 (149022b1d 2020-07-17)
git version 2.28.0

Let me know if you need any more info.

@sotrh sotrh added the bug Something isn't working label Oct 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant