Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm error: 'specify configs in the ini-formatted file:' \User\.npmrc

Tags:

npm

reactjs

NOOB here, trying to follow this React tutorial: https://github.com/reactjs/react-tutorial/

The README.md file says to: npm install node server.js

After cloning the repo, I ran npm install and a bunch of stuff (modules?) downloaded. But when I try to run npm server.js and I'm hit with this message:

Specify configs in the ini-formatted file:
    C:\Users\User\.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

[email protected] C:\Program Files\nodejs\node_modules\npm

C:\Users\User\.npmrc contains this: 
key=

Any ideas on how to get the npm server up and running? Do I need to set the key in this file to something?

like image 621
Justin Eder Avatar asked Apr 06 '16 19:04

Justin Eder


4 Answers

the correct way to start the server would be

npm run server.js
like image 94
asdf Avatar answered Sep 29 '22 07:09

asdf


Try out below command if trying to start NextJS react

npm run-script start

like image 24
anandharshan Avatar answered Sep 29 '22 07:09

anandharshan


Use npx instead of npm:

npx create-react-app my-app
like image 2
mohd nadeem Avatar answered Sep 27 '22 07:09

mohd nadeem


try like below command without npm

Ex: create-react-app app-name .(without npm)

like image 1
Akshay Jain Avatar answered Sep 27 '22 07:09

Akshay Jain