Anil S Anil S - 4 months ago 77
Node.js Question

NODE_PATH not recognized

Here is my

package.json
script:

"scripts": {
"start": "NODE_PATH=$NODE_PATH:./shared node",
"dev": "npm run start & webpack-dev-server --progress --color"
},


When I run
npm start
in Windows 8 it shows the below error:


node_path is not recognized as a internal or external command, operable program or batch file

Answer

You don't need to define environment variable in package.json just use this

{
 "scripts" : "node server.js"
}

or define what you want, here is the reference link.