-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Build failure on gatsby App because of object.assign not resolve in node_modules/assert #61
Comments
object.assign is in dependencies, so it’s fine on this end. Are you using npm? |
im having the same issue. With 2.0.0 works fine. Im using npm and the assert package is a dependency of node-polyfill-webpack-plugin. If i add this to my package.json the build works fine:
Without this i have the exact same issue as mention above |
Seems like it's an issue with that webpack plugin perhaps? |
The issue seems to be resolving the polyfill file e.g. this line in var objectAssign = require('object.assign/polyfill')(); throws the resolution error, changing it to this: var objectAssign = require('object.assign'); fixes the issue, would be good to update the package |
There should be no need, since that first line resolves just fine. |
Thanks for responding, and although it should resolve fine, it definitely doesn't for some of us. I'm kind of mystified why it doesn't, may be an issue with npm workspaces (I wouldn't be surprised at all) but I get the same error as OP, and directly editing the built file as I've outlined above fixes the issue. Totally appreciate that you may not want to fix in this way as the |
If it's just in gatsby, perhaps there's some hardcoded config there where it handles |
Working on Gatsby app and suddenly getting this issue, causing build fail:
Generating development JavaScript bundle failed
Can't resolve 'object.assign/polyfill' in 'C:\Home\ARK\Repos\shape-website-3\shape-website\website\node_modules\assert'
If you're trying to use a package make sure that 'object.assign/polyfill' is installed. If you're trying to use a local file make sure that the path is correct.
File: node_modules\assert\assert.js
Required urgent attention, please!
The text was updated successfully, but these errors were encountered: