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

App should sanitize package name #1024

Closed
paleite opened this issue Mar 22, 2018 · 0 comments
Closed

App should sanitize package name #1024

paleite opened this issue Mar 22, 2018 · 0 comments

Comments

@paleite
Copy link

paleite commented Mar 22, 2018

Version

3.0.0-beta.6

Reproduction link

https://codesandbox.io/s/yp48m5w21v

Steps to reproduce

vue create " invalid name"

OR

vue create existing-tabbed-folder-name/

What is expected?

vue-cli should be able to build the app once the project is created

What is actually happening?

yarn fails, saying:
error An unexpected error occurred: "package.json: Name contains illegal characters".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
ERROR command failed: yarn


Yarn is unable to run because the package name contains illegal characters. I'm not sure which chars are considered illegal, but spaces and slashes definitely are.

I ran into this bug trying to add Vue to an existing folder, when I tabbed the folder-name.

vue-cli should not be able to generate a project with an invalid package name.

Please note that the link above will display the bug if you download and build the project locally. Both NPM and Yarn are affected.

hiroppy added a commit to hiroppy/vue-cli that referenced this issue Mar 26, 2018
ISSUE: vuejs#1024
Add validate-npm-package-name.
hiroppy added a commit to hiroppy/vue-cli that referenced this issue Mar 26, 2018
ISSUE: vuejs#1024
Add validate-npm-package-name.
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

2 participants