Skip to content
This repository was archived by the owner on Apr 30, 2018. It is now read-only.
This repository was archived by the owner on Apr 30, 2018. It is now read-only.

npm start fails on Windows #305

Closed
Closed
@Den-dp

Description

@Den-dp

When I running npm start command I see this

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

> [email protected] start D:\dev\rep\angular-formly
> npm run watch & npm run test


> [email protected] 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! [email protected] watch: `NODE_ENV=development webpack --watch --progress --colors`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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 '.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions