formly-js / angular-formly

JavaScript powered forms for AngularJS

Home Page:http://docs.angular-formly.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm start fails on Windows

Den-dp opened this issue · comments

When I running npm start command I see this

D:\dev\rep\angular-formly>npm start

> angular-formly@6.6.0 start D:\dev\rep\angular-formly
> npm run watch & npm run test


> angular-formly@6.6.0 watch D:\dev\rep\angular-formly
> NODE_ENV=development webpack --watch --progress --colors

"NODE_ENV" is not recognized as an internal or external command, operable command or batch file

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "watch"
npm ERR! node v0.10.33
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! angular-formly@6.6.0 watch: `NODE_ENV=development webpack --watch --progress --colors`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-formly@6.6.0 watch script 'NODE_ENV=development webpack --watch --progress --colors'.
npm ERR! This is most likely a problem with the angular-formly package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     NODE_ENV=development webpack --watch --progress --colors
npm ERR! You can get their info via:
npm ERR!     npm owner ls angular-formly
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\dev\rep\angular-formly\npm-debug.log

This is basically because of the difference between unix and windows shell commands.

NODE_ENV=development webpack --watch --progress --colors

This line for windows will look like

set NODE_ENV=development&& webpack --watch --progress --colors

Also consider that I put && right after the value (without the extra space after the NODE_ENV variable).
This is because otherwise the space symbol will apper in process.env === 'development '.

Also I found related issue in npm npm/npm#2800

That issue on npm is the solution. I'll get this implemented soon. Thanks
for bringing it up :-)

-Kent C. Dodds

On Thu, May 21, 2015 at 2:39 PM, Denis Bendrikov notifications@github.com
wrote:

Also I found related issue in npm npm/npm#2800
npm/npm#2800


Reply to this email directly or view it on GitHub
#305 (comment)
.

@Den-dp could you please test #316 in an *nix environment since I don't have acces to one ATM

Tested, doesn't work for me. See PR for more info.

This is now fixed :-)