NODE_ENV Error
See original GitHub issue- Laravel Mix Version: #.#.# (
npm list --depth=0
) - Node Version (
node -v
): 6.11 - NPM Version (
npm -v
): 4.6 - OS: Windows 10
Description:
Error on npm run dev:
John Doe [2:42 PM]
'NODE_ENV' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev" "--scripts-prepend-node-path=auto"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! @ dev: `NODE_ENV=development webpack --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_ENV=development webpack --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_ENV=development webpack --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:
npm ERR! C:\Users\j.doe\IdeaProjects\proj\frontend\src\main\resources\npm-debug.log
I think there’s a problem on WIndows with NODE_ENV
Steps To Reproduce:
npm run dev
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
node.js - nodeenv : error when trying to start env
Well, got it by using verbose mode : $ nodeenv env -v. g++ was missing sudo apt-get install build-essential g++. Solves it !...
Read more >Issues · ekalinin/nodeenv - GitHub
Wrong npm version when spawning nodeenv using npx. #309 opened on Jun 23 by Maxim-Mazurok ... nodeenv error message for improper proxy address...
Read more >nodenv npm package not recognized : WEB-51045 - YouTrack
Try to add npm script run config and paste the npm location: ~/.nodenv/shims/npm 3. This happens: Error: Invalid npm/yarn package: file is specified, ......
Read more >Error NODE ENV is not recognized as an internal or external ...
I'm trying to setup an environment for a Node.js app. but I'm getting this error: "NODE_ENV" is not recognized as an internal or...
Read more >nodeenv - Python Package Health Analysis - Snyk
Learn more about nodeenv: package health score, popularity, security, ... Shows command output when error occurs; Excluded 'npm' from freeze list; Fixed bug...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It works after adding
cross-env
before eachNODE_ENV
on the scripts.Many thanks @crx4 , it’s woking for my case 😃