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

preact create does not write the proper name in the package.json file #408

Closed
ricardobrandao opened this issue Oct 17, 2017 · 5 comments
Closed
Labels

Comments

@ricardobrandao
Copy link

ricardobrandao commented Oct 17, 2017

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

Bug

What is the current behavior?

Package.json name property is not overriden (i.e. it maintains the placeholder "name": "{{ name }}")

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

Run the following steps:

preact create default some-name
cd some-name
yarn

The following error is thrown:
error package.json: Name contains illegal characters

If we pass a --name parameter, all works as expected. E.g. preact create default some-name --name some-name.

What is the expected behavior?

Either reflect the parameter requirement in the documentation or automatically map the project name.

The name property should be overwritten in the package.json file:
{ "name": "some-name" ... }

Please mention other relevant information.

  • node 8.6.0
  • npm 5.5.1
  • yarn 1.2.1
  • MacOS Hight Sierra
@lukeed
Copy link
Member

lukeed commented Oct 17, 2017

Thanks. Looks like I missed a default assignment.

In the meantime, use --name YourName. That will work.

@lukeed lukeed added the bug label Oct 17, 2017
@ricardobrandao
Copy link
Author

Thanks @lukeed. Yes, I am using that parameter. Already edited the issue :)

@alvaropinot
Copy link

I've came across this issue also, and seems like it silently fails to run npm install printing a ✔ Done!when it maybe should print an error. This is probably because of the invalid package.json and a permissive exec of npm install.

@mutebg
Copy link

mutebg commented Oct 20, 2017

the problem also appears in manifest.json as:
"name": "{{ name }}",
"short_name": "{{ name }}",

@lukeed
Copy link
Member

lukeed commented Oct 20, 2017

@mutebg Correct. Just waiting on a fellow team member to scoot it in for a quick 2.0.2 fix

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

4 participants