question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'node_modules' is not recognized as an internal or external command

See original GitHub issue

After npm install and npm run dev, console show:

@ dev C:\Users\lukas\apps
node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

‘node_modules’ is not recognized as an internal or external command, operable program or batch file.

npm ERR! Windows_NT 10.0.15014 npm ERR! argv “C:\NodeJS\node.exe” “C:\NodeJS\node_modules\npm\bin\npm-cli.js” “run” “dev” npm ERR! node v6.9.4 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! @ dev: node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ dev script ‘node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:30 (3 by maintainers)

github_iconTop GitHub Comments

30reactions
glukashcommented, Jan 25, 2017

add node ./ in each line, so they look like this:

    "dev": "node ./node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch": "node ./node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "hot": "node ./node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
    "production": "node ./node_modules/cross-env/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
26reactions
nickarellanocommented, Jan 24, 2017

I had the same issue. I just had to modify every instance of “node_modules/cross-env/bin/cross-env.js” with just “cross-env”

Read more comments on GitHub >

github_iconTop Results From Across the Web

node_modules is not recognized as an internal or external ...
The problem is when I execute the npm test command I get the following error. node_modules is not recognized as an internal or...
Read more >
'node_modules' is not recognized as an internal or external ...
'node_modules' is not recognized as an internal or external command, operable program or batch file. npm ERR! Windows_NT 10.0.15014
Read more >
Error is not recognized as an internal or external command
node_modules /nodemon/bin/nodemon.js src/app.js. I'm getting this error '.' is not recognized as an internal or external command, ...
Read more >
npm is not recognized as internal or external ... - YouTube
How to fix error 'npm' is not recognized as an internal or external command,operable program or batch file in node js is shown....
Read more >
How to resolve 'node' is not recognized as an internal or ...
How to resolve 'node' is not recognized as an internal or external command error after installing Node.js ?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found