-
Notifications
You must be signed in to change notification settings - Fork 73
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
Require packge.json and readline errors with webpack #114
Comments
Thanks for alerting us to this. We could change the way we snag the version to be more webpack-friendly somehow, any ideas as to how to do this without duplicating the version value from the |
Hmm, perhaps as part of you build step, you just write it to a file? I'd say have a look at the way others do it, like pouchdb has a release.sh https://github.com/pouchdb/pouchdb/blob/2be37213b03c5d5da1d79bf8b714dd8fba8c09d1/bin/release.sh |
Seems like a reasonable idea, thanks. We have a gulp build file so that seems probably pretty easy to slip in. We'll put it on our list, though if you send us a PR for us to review/edit it might move faster. |
I'm seeing these errors as well. The readline fix works, but adding .json to the resolve extensions list does not. I'm a complete webpack neophyte, so I'm not sure how to diagnose any further. My error, since it's slightly different:
|
After learning a little more about webpack, I was able to solve the json issue here. It was just a matter of using the json-loader. I added the following to my webpack config after installing module: {
loaders: [
{ test: /\.json$/, loader: 'json' }
]
} Might be obvious to others, but it took me a while to figure it out... |
Sorry, why does adding the following code solve the issue? @skinofstars, did you figure it out? node: { readline: 'empty' } |
Thank you @skinofstars for this issue! @rlucha here's what build-react-app says in the comments: |
Hey.
We've been getting issues with using this webpack. Kinda came as a double error
Resolution to the first was to add
.json
to our webpack resolve extensions config.This is all because teh dispatcher.js does
var VERSION = require('../package.json').version
Second was kinda weirder, we added to our webpack config
We've got it running now, but it was a bit of a pain.
Hope that helps someone
The text was updated successfully, but these errors were encountered: