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
vsce package error on Windows: The filename, directory name, or volume label syntax is incorrect. #747
Comments
FYI, I am able to run vsce package on another Windows machine, so this is clearly a local config issue. However, I have no idea how to troubleshoot this. |
I am in a similar boat, I keep getting brought back to this page as its the only relevant reference to this problem. |
After a long time of trying everything, removing the line :"vscode:prepublish": "npm run compile", from scripts in package.json allowed me to finally run vsce package, it clearly is NOT ideal but I also dont know why it would even cause a problem. I can run npm run compile perfectly fine and all of the debug runs work. |
I see similar behavior. I can run |
I have the same issue with my local development machine.
It works on the other local system, too. The strange thing is, "scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js"
},
I have tested and reproduced the issue on cmd and PowerShell core both. |
I think the problem just happens on windows system, the colon |
There is a simple solution: change package script to: Consider rename |
All of this is very strange:
What's common between all of you? |
Figured it out: I can repro if I update npm to 8.13.1. This is a bug in npm. |
Upstream issue, npm will fix: npm/cli#5066 Current workaround: downgrade npm to 8.11.0 |
Please downgrade npm. |
Thanks @joaomoreno , run |
Confirmed downgrading npm resolves the issue on my machine. I'm using npm-windows-upgrade so I ran |
I tried to downgrade and it caused more problems than I knew how to handle, I reverted and just used "vscode-prepublish" as @sinotaotao suggested and everything works fine. |
@Zxynine pay attention to this, rename |
The bug is also in 8.13.0. |
I've edited @sinotaotao's post so it doesn't confuse anyone else. Workaround: |
I created a new VSCode extension with
yo code
(usedtestext
as the extension name, chose defaults for other options), changed to the new extension directory and ranvsce package
and it failed.I am able to
vsce package
on WSL Ubuntu 20.04.node --version: v16.15.1
npm --version: 8.13.1
vsce --version: 2.9.2
The text was updated successfully, but these errors were encountered: