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 init -y && npx @pattern-lab/cli -c patternlab init fails on windows user with space #892

Closed
hdwebpros opened this issue Jul 12, 2018 · 5 comments

Comments

@hdwebpros
Copy link

I am trying to install @pattern-lab/edition-node@1.0.0-alpha.13 (I think) on Windows, with Node v9.9.0

Expected Behavior

npm init -y && npx @pattern-lab/cli -c patternlab init installs correctly for a user on Windows with a username with a space in it.

Actual Behavior

npm init -y && npx @pattern-lab/cli -c patternlab init creates:

Wrote to C:\websites\fail\package.json:
{
  "name": "fail",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}
npm ERR! code ENOLOCAL
npm ERR! Could not install from "Lastname\AppData\Roaming\npm-cache\_npx\10852" as it does not contain a package.json file.

I'm going to assume it should try to write a path to
C:\Users\Firstname Lastname\AppData\Roaming\npm-cache\_npx\10852

Steps to Reproduce

Be on Windows (10)
Make sure your folder within users has a space, like "Firstname Lastname"
Navigate to a blank folder and run npm init -y && npx @pattern-lab/cli -c patternlab init

@bmuenzenmeyer
Copy link
Member

@hdwebpros can you provide your npm -v and npx -v info?

zkat/npx#110 seems to indicate this should no longer be an issue

@hdwebpros
Copy link
Author

NPM 6.1
NPX

npm ERR! code ENOLOCAL
npm ERR! Could not install from "Lastname\AppData\Roaming\npm-cache\_npx\13512" as it does not contain a package.json file.

Which is the error with this issue

@hdwebpros
Copy link
Author

I did find this:
zkat/npx#146
So I ran npm config set cache C:\tmp\nodejs\npm-cache --global
and that seemed to cure this issue.

It also successfully installed the starter package (I have another issue related to that).

Progress!

@bmuenzenmeyer
Copy link
Member

Excellent!

@moshiuramit
Copy link

I did find this: zkat/npx#146 So I ran npm config set cache C:\tmp\nodejs\npm-cache --global and that seemed to cure this issue.

It also successfully installed the starter package (I have another issue related to that).

Progress!

Worked for me
Thank you

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

No branches or pull requests

3 participants