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

'cp' is not recognized as an internal or external command, #300

Closed
lucasborin opened this issue Oct 26, 2020 · 4 comments
Closed

'cp' is not recognized as an internal or external command, #300

lucasborin opened this issue Oct 26, 2020 · 4 comments

Comments

@lucasborin
Copy link
Contributor

PS C:\Users\x\Documents\GitHub\abaplint-sci-server> npm run build

> [email protected] build C:\Users\x\Documents\GitHub\abaplint-sci-server
'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: `tsc && cp -R public ./build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.

Windows devices must use copy instead.

However, even changing it in the package.json, it fails:

> [email protected] build C:\Users\i840577\Documents\GitHub\abaplint-sci-server
> tsc && copy -R public ./build

The system cannot find the file specified.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `tsc && copy -R public ./build`
npm ERR! Exit status 1
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.

Any idea?

@sbcgua
Copy link
Collaborator

sbcgua commented Oct 26, 2020

-R option does not exist in copy. Try removing it. Also maybe add /Y instead (run copy /? in the cmd to see the help)

@g-back
Copy link
Contributor

g-back commented Oct 26, 2020

you can also try installing cygwin, that should make the scripts work with cp

@larshp
Copy link
Member

larshp commented Oct 27, 2020

if you are using git for windows from https://git-scm.com, it will typically also include bash,

image

@lucasborin
Copy link
Contributor Author

Tested via Git Bash, and it works. Thanks! :)

larshp pushed a commit that referenced this issue Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants