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

Handling of username with spaces on windows #687

Closed
bracke opened this issue Sep 6, 2019 · 5 comments
Closed

Handling of username with spaces on windows #687

bracke opened this issue Sep 6, 2019 · 5 comments
Labels

Comments

@bracke
Copy link

bracke commented Sep 6, 2019

Hi

My windows username contains a space (its my full name), which ember-cli-update can't handle.
My project directory is a subfolder in Documents and therefore the full path contains my username.
The problem occurs both when running codemods and when updating.

If I move the projekt to the root of the drive, update works but codemods still fail, because they try to use the AppData folder.

Kind regards
Bent Bracke

@kellyselden
Copy link
Member

Can you provide more info? Perhaps a stack trace? The issue template when you filed should have given you instructions.

@bracke
Copy link
Author

bracke commented Sep 13, 2019

I have run:
set DEBUG=ember-cli-update,boilerplate-update,git-diff-apply && ember-cli-update --run-codemods

and selected the codemod "ember-modules-codemod".
Note how it has divided the path into separate paths:

verbose cli   'C:\\Users\\Bent',
1 verbose cli   'Bracke\\AppData\\Roaming\\npm-cache\\_npx\\24296',

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   'ember-modules-codemod@latest',
1 verbose cli   '--global',
1 verbose cli   '--prefix',
1 verbose cli   'C:\\Users\\Bent',
1 verbose cli   'Bracke\\AppData\\Roaming\\npm-cache\\_npx\\24296',
1 verbose cli   '--loglevel',
1 verbose cli   'error',
1 verbose cli   '--json' ]
2 info using npm@6.4.1
3 info using node@v10.15.3
4 verbose npm-session 7b05651f4c9d6042
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData error for file:Bracke\AppData\Roaming\npm-cache\_npx\24296 Could not install from "Bracke\AppData\Roaming\npm-cache\_npx\24296" as it does not contain a package.json file.
8 http fetch GET 304 https://registry.npmjs.org/ember-modules-codemod 943ms (from cache)
9 silly pacote tag manifest for ember-modules-codemod@latest fetched in 990ms
10 timing stage:rollbackFailedOptional Completed in 1ms
11 timing stage:runTopLevelLifecycles Completed in 1234ms
12 verbose stack Error: ENOENT: no such file or directory, open 'D:\Temp2019-08-19\emberconf2018-master\Bracke\AppData\Roaming\npm-cache\_npx\24296\package.json'
13 verbose cwd D:\Temp2019-08-19\emberconf2018-master
14 verbose Windows_NT 10.0.18362
15 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "ember-modules-codemod@latest" "--global" "--prefix" "C:\\Users\\Bent" "Bracke\\AppData\\Roaming\\npm-cache\\_npx\\24296" "--loglevel" "error" "--json"
16 verbose node v10.15.3
17 verbose npm  v6.4.1
18 error code ENOLOCAL
19 error Could not install from "Bracke\AppData\Roaming\npm-cache\_npx\24296" as it does not contain a package.json file.
20 verbose exit [ 1, true ]

@kellyselden
Copy link
Member

Cool thanks. That should be fixable.

@kellyselden
Copy link
Member

Unfortunately it's an npx bug npm/npx#6, and it appears it's not getting fixed. Perhaps we need to consider not using npx.

@kellyselden
Copy link
Member

This may fix your setup zkat/npx#146 (comment). Let me know if it doesn't.

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

No branches or pull requests

2 participants