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

package.json has wrong path for index.js at main #99

Open
joelalejandro opened this issue Sep 17, 2016 · 2 comments
Open

package.json has wrong path for index.js at main #99

joelalejandro opened this issue Sep 17, 2016 · 2 comments

Comments

@joelalejandro
Copy link

joelalejandro commented Sep 17, 2016

The template for package.json defines main as index.js, when there's no index.js file on the root of the project. It's either on src/ or dist/.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/37967673-package-json-has-wrong-path-for-index-js-at-main?utm_campaign=plugin&utm_content=tracker%2F18782092&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F18782092&utm_medium=issues&utm_source=github).
@mattjcowan
Copy link

In the tools/build.js file, the package.json file gets rewritten to the dist directory, which I think is the point for distributing the package to npm, and the pointer then is correct at that point ... But yeah, wouldn't work if you're just working with it locally. Optionally, could just do what you have done here, and then change the build.js file to do a replace on dist/index back to 'index' ... I think that's what's going on.

@brianzinn
Copy link

I set in project.json

"main": "dist/index.js"

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

3 participants