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

Generated package.json is missing attributes used in the banner #10

Open
kontur opened this issue Aug 12, 2014 · 4 comments
Open

Generated package.json is missing attributes used in the banner #10

kontur opened this issue Aug 12, 2014 · 4 comments

Comments

@kontur
Copy link

kontur commented Aug 12, 2014

Hey,

it's quite obvious that developers using the package.json will add the necessary attributes like name and homepage themselves, but for first time users it might be confusing that this grunt template's grunt tasks fails due to missing package attributes (used in the banner config). The outputted warning with a fresh install is:

Running "concat:dist" (concat) task
Warning: An error occurred while processing a template (Cannot read property 'name' of undefined). Use --force to continue.

Should the generated package.json include placeholders or empty values for all attributes used in the banner, and maybe when using the package.json generator print a notice to edit those.

I can provide a PR for this, if needed.

@kontur
Copy link
Author

kontur commented Aug 12, 2014

Or wrap those elements of the banner into conditionals as well in the banner config.

@Benjaminsson
Copy link

I couldn't get rid of the error even if i added the attributes to the package file.

@JohnLockwood
Copy link

Yes, I was bit by this and spent several hours on it. So Kontur, thanks for entering the the issue, and no, for first time users, it's not at all obvious that a project that "Create[s] a basic Gruntfile with grunt-init" fails to create a basic gruntfile that works out of the box. The point of "Hello World", it seems to me, is that it works when you DON'T yet know the environment well, without debugging it.

The way I got rid of the error was to comment out the banner altogether.

@dan-hill
Copy link

I had this problem also but this issue has been open and unfixed for 5 years so I am guessing this template is dead.

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

4 participants