-
Notifications
You must be signed in to change notification settings - Fork 110
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
ember build failing at webpack error (debugging help) #192
Comments
I'am getting the same error trying to build a ember-addon within a mono-repo. It works fine within its own repo. |
I think that error message is claiming that |
@ef4 I will grab that snippet locally. Do you what flag / env var I use to persist the broccoli artifacts? |
There may be some BROCCOLI_DEBUG tree that contains that file, but I'm not sure. If you run |
@ef4 thanks, if (typeof document !== 'undefined') {
__webpack_public_path__ = (function(){
var scripts = document.querySelectorAll('script');
return scripts[scripts.length - 1].src.replace(/\/[^/]*$/, '/');
})();
}
module.exports = (function(){
var d = _eai_d;
var r = _eai_r;
window.emberAutoImportDynamic = function(specifier) {
return r('_eai_dyn_' + specifier);
};
d('dropzone', [], function() { return require('//node_modules/dropzone/dist/dropzone.js'); });
d('intersection-observer-admin', [], function() { return require('//node_modules/intersection-observer-admin/dist/intersection-observer-admin.umd.js'); });
d('lodash', [], function() { return require('//node_modules/lodash/index.js'); });
d('marked', [], function() { return require('//node_modules/marked/lib/marked.js'); });
d('moment', [], function() { return require('//node_modules/moment/moment.js'); });
d('moment-timezone', [], function() { return require('//node_modules/moment-timezone/index.js'); });
d('raf-pool', [], function() { return require('//node_modules/raf-pool/dist/raf-pool.umd.js'); });
d('_eai_dyn_docx', [], function() { return import('//node_modules/docx/build/index.js'); });
})(); I think it complains that |
Maybe this is caused by webpack/webpack#8656 Do you have webpack 4.29.0? Can you try downgrading it to 4.28.0? |
@ef4 thanks, that is the culprit:
FWIW, we don't use webpack directly in our app. So perhaps we need to pin webpack to 4.28 in ember-auto-import? I can PR this if so. |
If you use yarn, you can use yarn resolutions to pin it without changing ember-auto-import. But yes, perhaps we should release a fix to ember-auto-import to save everybody else from running into this. It looks like the underlying bug is actually NPM's. One that has separately bitten me before. https://npm.community/t/packages-with-peerdependencies-are-incorrectly-hoisted/4794 |
Interesting. thanks tips and help debugging this! |
Workaround released in 1.2.21. |
After updating to ember-cli@3.7.1,
ember build
fails:We are using ember-auto-import@1.2.19. The failure comes from a dynamic import of the docx package. I believe I have the configuration specified correctly. Commenting out the
import(
causesember build
to succeed.I created a fresh application with a similar setup, and it works. This suggests a configuration bug with my main application. Do you have pointers to ember-auto-import internals to further debug this? I wanted to ask before pouring a day into fruitless debugging.
The text was updated successfully, but these errors were encountered: