getting following error whiling running npm install -g create-react-app - node.js

when i tried to run npm install -g create-react-app to create react app getting following error.
when i tired to run "npm install -g npm" getting same error.
Could you please guide me solve this issue ?
debug.log file,
1 verbose cli [
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 'install',
1 verbose cli '-g',
1 verbose cli 'create-react-app'
1 verbose cli ]
2 info using npm#6.14.13
3 info using node#v14.17.1
4 verbose npm-session 5c7b621106479737
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData error for create-react-app#latest error:0909006C:PEM routines:get_name:no start line
8 timing stage:rollbackFailedOptional Completed in 1ms
9 timing stage:runTopLevelLifecycles Completed in 162ms
10 verbose stack Error: error:0909006C:PEM routines:get_name:no start line
10 verbose stack at Object.createSecureContext (_tls_common.js:149:17)
10 verbose stack at Object.connect (_tls_wrap.js:1597:48)
10 verbose stack at HttpsAgent.createConnection (https.js:137:22)
10 verbose stack at HttpsAgent.createSocket (C:\Program Files\nodejs\node_modules\npm\node_modules\agentkeepalive\lib\_http_agent.js:265:26)
10 verbose stack at HttpsAgent.createSocket (C:\Program Files\nodejs\node_modules\npm\node_modules\agentkeepalive\lib\agent.js:77:11)
10 verbose stack at HttpsAgent.addRequest (C:\Program Files\nodejs\node_modules\npm\node_modules\agentkeepalive\lib\_http_agent.js:239:10)
10 verbose stack at new ClientRequest (_http_client.js:305:16)
10 verbose stack at request (https.js:333:10)
10 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:54:17
10 verbose stack at new Promise (<anonymous>)
10 verbose stack at fetch (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:41:10)
10 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\make-fetch-happen\index.js:332:14
10 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\promise-retry\index.js:29:24
11 verbose cwd C:\Users\user\development
12 verbose Windows_NT 10.0.19042
13 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "create-react-app"
14 verbose node v14.17.1
15 verbose npm v6.14.13
16 error code ERR_OSSL_PEM_NO_START_LINE
17 error error:0909006C:PEM routines:get_name:no start line
18 verbose exit [ 1, true ]```

Use the below commands to set up the development environment.
npx create-react-app my-app
cd my-app
npm start
Always follow the Documentation :)

Related

Error: spawn cmd ENOENT while starting React APP

I am creating a React Application. I ran the following command in cmd:
npx create-react-app .
Thereafter I tried to start the server using npm start as instructed in the tutorial:
https://github.com/facebook/create-react-app.
However, I keep getting the following error:
Error: spawn cmd ENOENT.
The log report generated by the error is:
0 info it worked if it ends with ok
1 verbose cli [
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 'start'
1 verbose cli ]
2 info using npm#6.10.2
3 info using node#v12.9.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle react_todo#0.1.0~prestart: react_todo#0.1.0
6 info lifecycle react_todo#0.1.0~start: react_todo#0.1.0
7 verbose lifecycle react_todo#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle react_todo#0.1.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\Projects\react_todo\node_modules\.bin;C:\Program Files\Java\jdk1.8.0_181\bin;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;E:\Projects\shopping-cart\node_modules\express-generator\bin;C:\Program Files\Git\cmd;C:\Program Files\PuTTY\;C:\Users\Arun\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Users\Arun\AppData\Local\Programs\Python\Python37-32\;C:\Users\Arun\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files (x86)\EasyPHP-Devserver-17\eds-binaries\dbserver\mysql5717x86x191225091928\bin;
9 verbose lifecycle react_todo#0.1.0~start: CWD: E:\Projects\react_todo
10 silly lifecycle react_todo#0.1.0~start: Args: [ '/d /s /c', 'react-scripts start' ]
11 silly lifecycle react_todo#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle react_todo#0.1.0~start: Failed to exec start script
13 verbose stack Error: react_todo#0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:326:16)
13 verbose stack at EventEmitter.emit (events.js:209:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:209:13)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid react_todo#0.1.0
15 verbose cwd E:\Projects\react_todo
16 verbose Windows_NT 6.1.7600
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v12.9.1
19 verbose npm v6.10.2
20 error code ELIFECYCLE
21 error errno 1
22 error react_todo#0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the react_todo#0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
It would be really helpful if could suggest me a way to resolve this issue. Thank You.
I resolved the issue by following these steps if anyone needs it in future:
Goto > Control Panel\System and Security\System\Advance system setting\Enviroment variable and set system variables path C:\Windows\System32\ variable and restart your System.
This comment really helped me out: https://github.com/facebook/create-react-app/issues/6908#issuecomment-495064048.
You should install create-react-app globally with -g.
npm install -g create-react-app
Alternatively, you could skip the installation of create-react-app.
For that you need firstly to update to a newer version of nodejs and npm and then you can run.
npx create-react-app yourappname

npm err ! unxepcter tocken occerd while installing react-native-cli

I'am trying to install react-native-cli but getting error
npm install -g react-native-cli
getting this error
0 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 'install',
1 verbose cli '-g',
1 verbose cli 'react-native-cli' ]
2 info using npm#6.4.1
3 info using node#v10.15.0
4 verbose npm-session 72c72ae6cf674a04
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 http://registry.npmjs.org/react-native-cli 247ms
8 silly fetchPackageMetaData error for react-native-cli#latest Unexpected token < in JSON at position 0 while parsing near '<HTML><HEAD>
8 silly fetchPackageMetaData <meta h...'
9 timing stage:rollbackFailedOptional Completed in 1ms
10 timing stage:runTopLevelLifecycles Completed in 568ms
11 verbose stack SyntaxError: Unexpected token < in JSON at position 0 while parsing near '<HTML><HEAD>
11 verbose stack <meta h...'
11 verbose stack at JSON.parse (<anonymous>)
11 verbose stack at parseJson (C:\Program Files\nodejs\node_modules\npm\node_modules\json-parse-better-errors\index.js:7:17)
11 verbose stack at consumeBody.call.then.buffer (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\body.js:96:50)
11 verbose stack at process._tickCallback (internal/process/next_tick.js:68:7)
12 verbose cwd C:\Users\Basva
13 verbose Windows_NT 10.0.17134
14 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "react-native-cli"
15 verbose node v10.15.0
16 verbose npm v6.4.1
17 error Unexpected token < in JSON at position 0 while parsing near '<HTML><HEAD>
17 error <meta h...'
18 verbose exit [ 1, true ]
What may be the wrong..!!!?
Make sure whether your npm package correctly install.I solved this problem following below step.Try it..
npm i -g npm
npm cache clean
npm update
npm i
I think https://facebook.github.io/react-native/docs/getting-started.html is more useful for your.

Every npm install gives "npm ERR! Only absolute URLs are supported"

Tried nodeJS 8.12 and 10.11
Running latest npm 6.4.1
When trying to install any package i.e. (npm install -g firebase-tools) I get npm ERR! Only absolute URLs are supported.
Uninstalled and reinstall nodeJS. Still broken. Any help appreciated.
Debug Log
0 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 'install',
1 verbose cli '-g',
1 verbose cli 'firebase-tools' ]
2 info using npm#6.4.1
3 info using node#v10.11.0
4 verbose npm-session 442f99e3eed77ef2
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData error for firebase-tools#latest Only absolute URLs are supported
8 timing stage:rollbackFailedOptional Completed in 0ms
9 timing stage:runTopLevelLifecycles Completed in 206ms
10 verbose stack TypeError: Only absolute URLs are supported
10 verbose stack at getNodeRequestOptions (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\request.js:131:11)
10 verbose stack at fetch.Promise (C:\Program Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:44:21)
10 verbose stack at new Promise (<anonymous>)
10 verbose stack at fetch (C:\Program
Files\nodejs\node_modules\npm\node_modules\node-fetch-npm\src\index.js:41:10)
10 verbose stack at retry (C:\Program Files\nodejs\node_modules\npm\node_modules\make-fetch-happen\index.js:332:14)
10 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\promise-retry\index.js:29:24
11 verbose cwd C:\Users\Mine
12 verbose Windows_NT 10.0.17134
13 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "firebase-tools"
14 verbose node v10.11.0
15 verbose npm v6.4.1
16 error Only absolute URLs are supported
17 verbose exit [ 1, true ]
Solution moved from #StevePerry's question post.
Had to edit .npmrc file located at C:\Users\yourName\.npmrc
It had a bunch of lines. Only ones needed for me:
//registry.npmjs.org/:_authToken="your_auth_token"
scope="your_name"
#"your_name":registry=https://registry.npmjs.org/

Run reactJS client with NodeJS

I am .net developer.Previous developer used nodeJS and react for one project.I must complete that project.That project use nodeJS,and reactJS.I installed NodeJS in windows 8
I install packages(npm install) it worked well.But now I try to run-start project but it give error
When I write npm start it give that error
Failed at the react-seed #0.0.13 start script node_env=development node dev-server .webpack/config
here is log file
0 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 'start' ]
2 info using npm#2.14.20
3 info using node#v4.4.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart react-seed#0.0.13
6 verbose unsafe-perm in lifecycle true
7 info start react-seed#0.0.13
8 verbose unsafe-perm in lifecycle true
9 info react-seed#0.0.13 Failed to exec start script
10 verbose stack Error: react-seed#0.0.13 start: `NODE_ENV=development node dev-server ./webpack/config`
10 verbose stack Exit status 1
10 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:214:16)
10 verbose stack at emitTwo (events.js:87:13)
10 verbose stack at EventEmitter.emit (events.js:172:7)
10 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
10 verbose stack at emitTwo (events.js:87:13)
10 verbose stack at ChildProcess.emit (events.js:172:7)
10 verbose stack at maybeClose (internal/child_process.js:827:16)
10 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
11 verbose pkgid react-seed#0.0.13
12 verbose cwd C:\nodeAQ
13 error Windows_NT 6.3.9600
14 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
15 error node v4.4.1
16 error npm v2.14.20
17 error code ELIFECYCLE
18 error react-seed#0.0.13 start: `NODE_ENV=development node dev-server ./webpack/config`
18 error Exit status 1
19 error Failed at the react-seed#0.0.13 start script 'NODE_ENV=development node dev-server ./webpack/config'.
19 error This is most likely a problem with the react-seed package,
19 error not with npm itself.
19 error Tell the author that this fails on your system:
19 error NODE_ENV=development node dev-server ./webpack/config
19 error You can get information on how to open an issue for this project with:
19 error npm bugs react-seed
19 error Or if that isn't available, you can get their info via:
19 error
19 error npm owner ls react-seed
19 error There is likely additional logging output above.
20 verbose exit [ 1, true ]

relay-starter-kit failed on windows

I installed the replay starter kit on my windows 10 machine, but I get errors after "npm start." The key failure seems to be at 'babel-node ./server.js'.
Here's my npm debug log:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\\\node.exe',
1 verbose cli 'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm#2.11.2
3 info using node#v0.12.5
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info prestart relay-starter-kit#0.1.0
6 info start relay-starter-kit#0.1.0
7 verbose unsafe-perm in lifecycle true
8 info relay-starter-kit#0.1.0 Failed to exec start script
9 verbose stack Error: relay-starter-kit#0.1.0 start: `babel-node ./server.js`
9 verbose stack Exit status 1
9 verbose stack at EventEmitter.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
9 verbose stack at EventEmitter.emit (events.js:110:17)
9 verbose stack at ChildProcess.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
9 verbose stack at ChildProcess.emit (events.js:110:17)
9 verbose stack at maybeClose (child_process.js:1015:16)
9 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
10 verbose pkgid relay-starter-kit#0.1.0
11 verbose cwd C:\Users\Polisander\Code\miles-relay
12 error Windows_NT 6.3.9600
13 error argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
14 error node v0.12.5
15 error npm v2.11.2
16 error code ELIFECYCLE
17 error relay-starter-kit#0.1.0 start: `babel-node ./server.js`
17 error Exit status 1
18 error Failed at the relay-starter-kit#0.1.0 start script 'babel-node ./server.js'.
18 error This is most likely a problem with the relay-starter-kit package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error babel-node ./server.js
18 error You can get their info via:
18 error npm owner ls relay-starter-kit
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

Resources