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 run build' fails on Windows systems #973

Closed
Tracked by #1780
deining opened this issue Apr 9, 2022 · 3 comments · Fixed by #1810
Closed
Tracked by #1780

'npm run build' fails on Windows systems #973

deining opened this issue Apr 9, 2022 · 3 comments · Fixed by #1810
Assignees
Labels

Comments

@deining
Copy link
Collaborator

deining commented Apr 9, 2022

On my Linux system, I can run npm run build without problems.

On my Windows 10 box, the same command fails, however:

F:\DocsyFinal\docsy-ad>npm run build

> docsy@0.2.0 build
> npm run cd:docs build


> docsy@0.2.0 cd:docs
> npm run _cd:docs -- npm run "build"


> docsy@0.2.0 _cd:docs
> cd userguide && "npm" "run" "build"


> build
> npm run _build


> _build
> npm run _hugo-dev


> _hugo-dev
> npm run _hugo -- -e dev -DFE


> pre_hugo
> set -x && npm run ${DOCSY_VENDOR:-keep}:vendor

Die Umgebungsvariable "-x " ist nicht definiert.
npm ERR! code 1
npm ERR! path F:\DocsyFinal\docsy-ad\userguide
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c set -x && npm run ${DOCSY_VENDOR:-keep}:vendor

@chalin
Copy link
Collaborator

chalin commented Nov 11, 2023

@deining - Ok, I can work around the use of set -x. When you have the chance, could you run the following from a Windows system and let me know what the output is?

$ npx -p cross-env cross-env-shell DEPTH=9 "echo DEPTH is \${DEPTH:- 0}"
DEPTH is 9

The notation ${VAR:- VAL} is very convenient, and it would be great if it could work when using cross-env (I suspect not, but I'm willing to be surprised).

@deining
Copy link
Collaborator Author

deining commented Nov 12, 2023

@deining - Ok, I can work around the use of set -x. When you have the chance, could you run the following from a Windows system and let me know what the output is?

As expected, no good news here:

$ npx -p cross-env cross-env-shell DEPTH=9 "echo DEPTH is \${DEPTH:- 0}"
DEPTH is ${DEPTH:- 0}

@chalin
Copy link
Collaborator

chalin commented Nov 12, 2023

Thanks for confirming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants