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

Invalid package name. #466

Closed
milesthedisch opened this issue Jan 18, 2018 · 9 comments
Closed

Invalid package name. #466

milesthedisch opened this issue Jan 18, 2018 · 9 comments

Comments

@milesthedisch
Copy link
Contributor

milesthedisch commented Jan 18, 2018

Do you want to request a feature or report a bug?

Feature

What is the current behaviour?

Given a invalid package name preact is creating a package.json file with the an invalid package name.

If the current behaviour is a bug, please provide the steps to reproduce.

preact create simple ./a-name-mistaken-for-a-path
cd ./a-name-mistaken-for-a-path
npm start

npm ERR! Invalid name: "./a-name-mistaken-for-a-path"

What is the expected behaviour?

Preact should validate the name before generating files.

If this is a feature request, what is motivation or use case for changing the behaviour?

This is a feature request, it kind of bugs me... thats really the only motivation.

Please mention other relevant information.

  • node 8.9.3
  • npm 5.5.1
  • macOS Sierra, 10.12.6
  • preact-cli 2.1.1
@ForsakenHarmony
Copy link
Member

It's pretty easy to fix by just changing the name, but we could do that

@milesthedisch
Copy link
Contributor Author

Im working on a PR now. @ForsakenHarmony, cant seem to get the tests suites to pass though. Happy to contribute :)

@reznord
Copy link
Member

reznord commented Jan 18, 2018

Hmm...tests aren't passing? 🤔 What's the error that you are getting?

@milesthedisch
Copy link
Contributor Author

milesthedisch commented Jan 18, 2018

I did a fresh rm -rf node_modules and a yarn install, and I'm getting this. @reznord

screen shot 2018-01-18 at 6 11 14 pm

Also the tests take a bit of time to run...

@reznord
Copy link
Member

reznord commented Jan 18, 2018

Aha! Can you please try it running once more? That is because of node-tar which we use for unzipping the template.

@milesthedisch
Copy link
Contributor Author

@reznord Thanks! They are passing now. The tests are estimated to take 790s to finish running!! Thats incredible 😆 ...

@reznord
Copy link
Member

reznord commented Jan 18, 2018

@lukeed is working on a PR where he is reworking on the tests. (available in rework branch)

@milesthedisch
Copy link
Contributor Author

@reznord Still getting errors different ones though.

screen shot 2018-01-18 at 6 35 27 pm

@lukeed
Copy link
Member

lukeed commented Jan 21, 2018

Closed in #468

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

4 participants