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

Webpack error #108

Closed
lishine opened this issue Jan 15, 2019 · 5 comments
Closed

Webpack error #108

lishine opened this issue Jan 15, 2019 · 5 comments
Labels

Comments

@lishine
Copy link

lishine commented Jan 15, 2019

When deploying on Zeit Now v2 , there is an error from webpack, that I found is due to this package

ModuleDependencyWarning: Critical dependency: the request of a dependency is an expression
                              at Compilation.reportDependencyErrorsAndWarnings (/tmp/2b34e4f6/node_modules/webpack/lib/Compilation.js:1359:23)
                              at Compilation.finish (/tmp/2b34e4f6/node_modules/webpack/lib/Compilation.js:1165:9)
                              at hooks.make.callAsync.err (/tmp/2b34e4f6/node_modules/webpack/lib/Compiler.js:544:17)
                              at _err0 (eval at create (/tmp/2b34e4f6/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:11:1)
                              at Promise.all.then (/tmp/2b34e4f6/node_modules/webpack/lib/DynamicEntryPlugin.js:74:20)
                              at <anonymous>
                              at process._tickCallback (internal/process/next_tick.js:188:7)
                              at CommonJsRequireContextDependency.getWarnings (/tmp/2b34e4f6/node_modules/webpack/lib/dependencies/ContextDependency.js:40:18)
                              at Compilation.reportDependencyErrorsAndWarnings (/tmp/2b34e4f6/node_modules/webpack/lib/Compilation.js:1354:24)
                              at Compilation.finish (/tmp/2b34e4f6/node_modules/webpack/lib/Compilation.js:1165:9)
                              at hooks.make.callAsync.err (/tmp/2b34e4f6/node_modules/webpack/lib/Compiler.js:544:17)
                              at _err0 (eval at create (/tmp/2b34e4f6/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:11:1)
                              at Promise.all.then (/tmp/2b34e4f6/node_modules/webpack/lib/DynamicEntryPlugin.js:74:20)
                              at <anonymous>
                              at process._tickCallback (internal/process/next_tick.js:188:7)
@developit
Copy link
Owner

developit commented Jan 15, 2019

@lishine how are you inferring that this is due to unfetch? There are no dependencies in this library, so it's pretty unlikely that Webpack would be finding one it can't statically analyze.

@lishine
Copy link
Author

lishine commented Jan 16, 2019

Hi :)
By way of elimination. I import file which imports only isomorphic-unfetch and basically just doing fetch. And then I see this error. If I remove to this file, no error

@Skaronator
Copy link

I think the source of this warning comes from this file: https://github.com/developit/unfetch/blob/master/packages/isomorphic-unfetch/index.js

@Skaronator
Copy link

Skaronator commented Feb 2, 2019

Looks like it's the fault of node-fetch (or dependencies in node-fetch), still getting these warnings after replacing isomorphic-unfetch by node-fetch:


ModuleDependencyWarning: Critical dependency: the request of a dependency is an expression
    at Compilation.reportDependencyErrorsAndWarnings (/tmp/24a8999e/node_modules/webpack/lib/Compilation.js:1361:23)
    at Compilation.finish (/tmp/24a8999e/node_modules/webpack/lib/Compilation.js:1167:9)
    at hooks.make.callAsync.err (/tmp/24a8999e/node_modules/webpack/lib/Compiler.js:622:17)
    at _err0 (eval at create (/tmp/24a8999e/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:11:1)
    at Promise.all.then (/tmp/24a8999e/node_modules/webpack/lib/DynamicEntryPlugin.js:74:20)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
    at CommonJsRequireContextDependency.getWarnings (/tmp/24a8999e/node_modules/webpack/lib/dependencies/ContextDependency.js:40:18)
    at Compilation.reportDependencyErrorsAndWarnings (/tmp/24a8999e/node_modules/webpack/lib/Compilation.js:1356:24)
    at Compilation.finish (/tmp/24a8999e/node_modules/webpack/lib/Compilation.js:1167:9)
    at hooks.make.callAsync.err (/tmp/24a8999e/node_modules/webpack/lib/Compiler.js:622:17)
    at _err0 (eval at create (/tmp/24a8999e/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:11:1)
    at Promise.all.then (/tmp/24a8999e/node_modules/webpack/lib/DynamicEntryPlugin.js:74:20)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

@developit
Copy link
Owner

This is fixed by #133.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants