Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NODE_ENV is not a recognized internal or external command Solution #86

Closed
ssysm opened this issue Jun 3, 2018 · 2 comments
Closed

NODE_ENV is not a recognized internal or external command Solution #86

ssysm opened this issue Jun 3, 2018 · 2 comments

Comments

@ssysm
Copy link
Contributor

ssysm commented Jun 3, 2018

Hi,
just came across this issue when the application is build on a Windows box and the command telling me that NODE_ENV is not a recognized internal or external command

full log:

C:\Users\admin\IdeaProjects\spi\docs>npm run build

> [email protected] build C:\Users\admin\IdeaProjects\spi\docs
> NODE_ENV=production browserify src/index.js | uglifyjs -c -m > bundle.js

'NODE_ENV' is not recognized as an internal or external command operable program or batch file.

npm ERR! code ELIFECYCLE
npm ERR! errno 255
npm ERR! [email protected] build: `NODE_ENV=production browserify src/index.js | uglifyjs -c -m > bundle.js`
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\admin\AppData\Roaming\npm-cache\_logs\2018-06-03T05_01_18_255Z-debug.log

This happend to me like three month ago, and I just removed set NODE_ENV=production part and build the application in development mode and today came across another package called cross-env that can let me build the application in production mode on Windows.

Would be nice if you can test it out and add to the dev dependencies or I can just pr one. 👍

@tmcw
Copy link
Owner

tmcw commented Jun 3, 2018

Sure, I'd accept a PR using cross-env to make that command compatible with non-posix shells

@tmcw
Copy link
Owner

tmcw commented Jun 3, 2018

Fixed in #87

@tmcw tmcw closed this as completed Jun 3, 2018
shawnjzlee pushed a commit to shawnjzlee/docbox that referenced this issue Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants