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

doesn't work using "npx" #11

Open
yairEO opened this issue Jun 19, 2019 · 1 comment
Open

doesn't work using "npx" #11

yairEO opened this issue Jun 19, 2019 · 1 comment

Comments

@yairEO
Copy link

yairEO commented Jun 19, 2019

npx svg-sprite-generate -d src/components/Icon/icons -o src/components/Icon/sprite.svg

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/svg-sprite-generate - Not found
npm ERR! 404 
npm ERR! 404  'svg-sprite-generate@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/yeven/.npm/_logs/2019-06-19T12_19_52_048Z-debug.log
Install for [ 'svg-sprite-generate@latest' ] failed with code 1

For some reason https://registry.npmjs.org/svg-sprite-generate returns:

{"error":"Not found"}
@c-vetter
Copy link

The problem lies in the fact that the package and the binary are named differently. You need to use the package name. Depending on your version of npx, you may need both, I haven't checked that. So, instead of npx svg-sprite-generate, you need to use npx svg-sprite-generator (works with up-to-date npx) or possibly npx -p svg-sprite-generator svg-sprite-generate (will always work).

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

No branches or pull requests

2 participants