-
Notifications
You must be signed in to change notification settings - Fork 4
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
appmap-node command fails, presumably due to Windows path issue #122
Comments
Could this be related to a space in the user home directory path? Nb, I tried reproducing this by putting both appmap-node and the target project on a space-containing path on Linux, but it works for me. Perhaps there is something else going on or the problem is Windows-specific. |
Another user saw this, they say they definitely didn't have a space in the path, so this must be something else. In case it's relevant, the OP was running Node 20.11. |
Steps to reproduce:
This will result in the reported error: It seems that the issue lies in the npm cache path, which contains a space from the username.
To resolve this, eliminate the space in the npm cache path by using the 8-character version of the Windows user folder name. You can find out the 8-character user folder name with
This should resolve the issue. Similar issue is reported with different packages run with npx. Most relevant one is this: https://stackoverflow.com/questions/58354348/windows-10-npx-create-react-app-myapp-command-does-not-work-because-of-whit. Additionally, you may encounter a different error before this one above, even if you don't have spaces in the user name: The workaround for this is to create the |
Let’s add to our docs on appmap.io
…On Fri, Mar 8, 2024 at 03:37 zermelo-wisen ***@***.***> wrote:
Steps to reproduce:
- Set up a Windows environment (e.g., create a Windows VPS on AWS)
- Create a user with a space in the user name: “John Doe”
- Switch to the new user
- Install Node to the default location
- npm init a trivial project
- Run npx app map-node rpm run test
This will result in the reported error. It seems that the issue lies in
the npm cache path, which contains a space from the username.
npm config get cache
C:\Users\John Doe\AppData\Local\npm-cache
To resolve this, eliminate the space in the npm cache path:
npm config set cache "C:\Users\John~1\AppData\Roaming\npm-cache" --global
This should resolve the issue.
Similar issue is reported with different packages run with npx. Most
relevant one is this:
https://stackoverflow.com/questions/58354348/windows-10-npx-create-react-app-myapp-command-does-not-work-because-of-whit
.
—
Reply to this email directly, view it on GitHub
<#122 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAVC6ZUUPDIPZLS4ZQFWFDYXF2DFAVCNFSM6AAAAABEDFT2PCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBVGI3TCNRXGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Seems like another workaround is to |
@zermelo-wisen, could you verify |
I tried it, unfortunately not. npm@7 is an old version now anyway. |
Yeah, I suspected as much :/ Thanks for checking. Did you find a current bug report in npx for this issue? Because it seems npm/cli#502 is out of date. |
I checked the issues list, but couldn't find any. |
It's actually our bug, I'm going to fix it. |
This had a workaround but it turns out that it is in fact our bug. Fixes #122
This had a workaround but it turns out that it is in fact our bug. Fixes #122
This had a workaround but it turns out that it is in fact our bug. Fixes #122
# [2.19.0](v2.18.0...v2.19.0) (2024-03-19) ### Bug Fixes * Correctly quote NODE_OPTIONS when spaces occur in paths ([36b5c9e](36b5c9e)), closes [#122](#122) ### Features * Instrument named const and exported lambdas ([4ec7754](4ec7754)) * Stringify ClientRequests as `[ClientRequest: <method> <url>]` ([f4b8518](f4b8518))
🎉 This issue has been resolved in version 2.19.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The text was updated successfully, but these errors were encountered: