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

"npm start" fails on Windows #17

Open
miliu99 opened this issue Apr 13, 2017 · 2 comments
Open

"npm start" fails on Windows #17

miliu99 opened this issue Apr 13, 2017 · 2 comments

Comments

@miliu99
Copy link

miliu99 commented Apr 13, 2017

Am I the first one running this in Windows? I got this error after cloning and run npm start:

'cp' is not recognized as an internal or external command, operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build-electron: `ng build --base-href . && cp s
rc/electron/* dist`
npm ERR! Exit status 1
npm ERR!

As I figured out, cp in Lunux is copy in windows. However, we also need to change the path seperators, so change this line:

"build-electron": "ng build --base-href . && cp src/electron/* dist",
to this will make npm start work in windows.

"build-electron": "ng build --base-href . && copy src\\electron\\* dist",

Hope it helps someone down the road.

@JSponaugle
Copy link

👍

@spali
Copy link

spali commented Jun 21, 2017

you can also use the npm module cpr and replace the command with "build-electron": "ng build --base-href . && cpr src/electron dist
then it should work on all platforms

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

3 participants