Skip to content

npm ERR! code 1 #10128

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

Closed
behjaf opened this issue Nov 23, 2020 · 4 comments
Closed

npm ERR! code 1 #10128

behjaf opened this issue Nov 23, 2020 · 4 comments

Comments

@behjaf
Copy link

behjaf commented Nov 23, 2020

Dear Sir/Madam.
I installed node-v15.2.1-x64. when I want to run "npx create-react-app my-app" command. it gives me an error

-------------------------------++++++++++++--------------------------

You are running `create-react-app` 4.0.0, which is behind the latest release (4.0.1).

We no longer support global installation of Create React App.

Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app

The latest instructions for creating a new app can be found here:
https://create-react-app.dev/docs/getting-started/

npm ERR! code 1
npm ERR! path C:\Users\Behrouz\Desktop\New folder
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c ""create-react-app" "my-app""

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Behrouz\AppData\Local\npm-cache\_logs\2020-11-23T07_36_13_559Z-debug.log

-------------------------------++++++++++++--------------------------

I tried use this command : "npm uninstall -g create-react-app" . the result is:

up to date in 270ms
found 0 vulnerabilities

but when I want to rerun "npx create-react-app my-app" command. it gives me the same error as I described.

bellow is log file content:

0 verbose cli [
0 verbose cli 'C:\Program Files\nodejs\node.exe',
0 verbose cli 'C:\Users\Behrouz\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
0 verbose cli 'exec',
0 verbose cli '--',
0 verbose cli 'create-react-app',
0 verbose cli 'my-app'
0 verbose cli ]
1 info using [email protected]
2 info using [email protected]
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:C:\Users\Behrouz\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 0ms
5 timing config:load:builtin Completed in 0ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:C:\Users\Behrouz\Desktop\New folder.npmrc Completed in 0ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:C:\Users\Behrouz.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:C:\Program Files\nodejs\etc\npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 1ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 5ms
19 verbose npm-session 0d42a82a58d056bd
20 timing npm:load Completed in 12ms
21 http fetch GET 304 https://registry.npmjs.org/create-react-app 567ms (from cache)
22 timing arborist:ctor Completed in 1ms
23 timing arborist:ctor Completed in 0ms
24 timing arborist:ctor Completed in 1ms
25 timing command:exec Completed in 3410ms
26 verbose stack Error: command failed
26 verbose stack at ChildProcess. (C:\Users\Behrouz\AppData\Roaming\npm\node_modules\npm\node_modules@npmcli\promise-spawn\index.js:64:27)
26 verbose stack at ChildProcess.emit (node:events:329:20)
26 verbose stack at maybeClose (node:internal/child_process:1055:16)
26 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:288:5)
27 verbose cwd C:\Users\Behrouz\Desktop\New folder
28 verbose Windows_NT 10.0.19042
29 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\Behrouz\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "exec" "--" "create-react-app" "my-app"
30 verbose node v15.2.1
31 verbose npm v7.0.9
32 error code 1
33 error path C:\Users\Behrouz\Desktop\New folder
34 error command failed
35 error command C:\WINDOWS\system32\cmd.exe /d /s /c ""create-react-app" "my-app""
36 verbose exit 1

I'm running

node version: v15.2.1
npm version: 7.0.9
npx version: 7.0.9
OS: Windows 10 version 20H2 - 19042.630
@ghost
Copy link

ghost commented Nov 23, 2020

Did you verify that it actually was removed? try npm ls -g --depth=0

@behjaf
Copy link
Author

behjaf commented Nov 23, 2020

Did you verify that it actually was removed? try npm ls -g --depth=0

this is the result

C:\Program Files\nodejs
`-- [email protected]

@ghost
Copy link

ghost commented Nov 23, 2020

Duplicate of #10127

@behjaf behjaf closed this as completed Nov 24, 2020
@behjaf
Copy link
Author

behjaf commented Nov 24, 2020

Duplicate of #10127

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant