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

[BUG] v8.13.0 npm run <script> fails #5066

Closed
2 tasks done
JonasSchubert opened this issue Jun 23, 2022 · 10 comments · Fixed by npm/run-script#84 or npm/run-script#86
Closed
2 tasks done

[BUG] v8.13.0 npm run <script> fails #5066

JonasSchubert opened this issue Jun 23, 2022 · 10 comments · Fixed by npm/run-script#84 or npm/run-script#86
Assignees
Labels
Bug thing that needs fixing Priority 1 high priority issue Release 8.x work is associated with a specific npm 8 release

Comments

@JonasSchubert
Copy link

JonasSchubert commented Jun 23, 2022

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

I am unable to run scripts defined in my package.json. npm run <script> outputs The filename, directory name, or volume label syntax is incorrect. (translated from german 'Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch.')
Downgrading to v8.12.2 for now as scripts are able to run using this npm version.

Expected Behavior

All scripts should run without an error.

Steps To Reproduce

  1. Install the latest npm version 8.13.0 globally
  2. Run any script defined in your package.json
  3. See error: The filename, directory name, or volume label syntax is incorrect. (translated from german 'Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch.')

Environment

  • npm: 8.13.0
  • Node.js: 16.15.1
  • OS Name: Windows 10
  • System Model Name: HP ZBook
  • npm config:
; "builtin" config from C:\Users\[retracted]\AppData\Roaming\npm\node_modules\npm\npmrc

prefix = "C:\\Users\\[retracted]\\AppData\\Roaming\\npm"

; "user" config from C:\Users\[retracted]\.npmrc

[retracted]:registry = "[retracted]"
[retracted]:registry = "[retracted]"
[retracted]
registry = "[retracted]"

; node bin location = C:\Program Files\nodejs\node.exe
; node version = v16.15.1
; npm local prefix = [retracted]
; npm version = 8.13.0
; cwd = [retracted]
; HOME = C:\Users\[retracted]
; Run `npm config ls -l` to show all defaults.
@JonasSchubert JonasSchubert added Bug thing that needs fixing Needs Triage needs review for next steps Release 8.x work is associated with a specific npm 8 release labels Jun 23, 2022
@schachafatzitz
Copy link

i encountered the same issue

on my side i am running "npm run build"

the package.config contains these values

"build": "npm run legacy:build & nx build --prod  & nx build management --prod",
"legacy:build": "npm run build --prefix _legacy/",

when i change the colon into a dash everything works

"build": "npm run legacy-build & nx build --prod  & nx build management --prod",
"legacy-build": "npm run build --prefix _legacy/",

@nlf
Copy link
Contributor

nlf commented Jun 23, 2022

sorry about that one, folks. the pull request linked above should fix the issue for you and we'll get that out in a new npm release soon

@nlf nlf self-assigned this Jun 23, 2022
@nlf nlf added Priority 1 high priority issue and removed Needs Triage needs review for next steps labels Jun 23, 2022
robertpatrick added a commit to oracle/weblogic-toolkit-ui that referenced this issue Jun 23, 2022
@JonasSchubert
Copy link
Author

Hi @nlf, I just installed npm@8.13.1 and I still encounter the failing scripts.
As @schachafatzitz described it is related to scripts with a colon, e.g. build:prod fails, but build-prod is ok.

Do we need to escape colons too, similar to spaces in your mentioned MR?

i encountered the same issue

on my side i am running "npm run build"

the package.config contains these values

"build": "npm run legacy:build & nx build --prod  & nx build management --prod",
"legacy:build": "npm run build --prefix _legacy/",

when i change the colon into a dash everything works

"build": "npm run legacy-build & nx build --prod  & nx build management --prod",
"legacy-build": "npm run build --prefix _legacy/",

@Blodwynn
Copy link

Same here, we ended up downgrading to a previous npm version. 8.13.1 didn't fix the problem for us either.

@unpunnyfuns
Copy link

Same here, this ticket should probably be re-opened.

@BleedingDev
Copy link

Reproduced it too, downgrade to version 8.12.2 helped. :)

@frederikhors
Copy link

THIS IS HUGE!

@nlf
Copy link
Contributor

nlf commented Jun 27, 2022

this got closed when the dependency was updated, when #5086 here lands and is published in a couple of days the new release takes care of the issue with : in script names

@JoshMcCullough
Copy link

I hope the fix will also work when a script name contains slashes e.g. build-spec:some/branch.

@JonasSchubert
Copy link
Author

this got closed when the dependency was updated, when #5086 here lands and is published in a couple of days the new release takes care of the issue with : in script names

Thanks @nlf and all other contributors to npm. Your work is very much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Priority 1 high priority issue Release 8.x work is associated with a specific npm 8 release
Projects
None yet
8 participants