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

Module not found: Error: Can't resolve './convert-source-map' -- upgrade from 0.26.4 to 0.27.2 #451

Closed
jeff-kilbride opened this issue Mar 12, 2017 · 1 comment · Fixed by #452

Comments

@jeff-kilbride
Copy link

jeff-kilbride commented Mar 12, 2017

Do you want to request a feature or report a bug?

Possible bug.

What is the current behavior?
Errors when upgrading from 0.26.4 to 0.27.2

If the current behavior is a bug, please provide the steps to reproduce.

Upgrade from 0.26.4 to 0.27.2

What is the expected behavior?
Same configuration should work in both versions.

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information such as your webpack version, Node.js version and Operating System.
Node v6.10.0
Webpack 2.2.1

I am getting the following error when upgrading from 0.26.4 to 0.27.2:

ERROR in ../~/css-loader/lib/css-base.js
Module not found: Error: Can't resolve './convert-source-map' in '/Users/jeff/WebstormProjects/admin/node_modules/css-loader/lib'
 @ ../~/css-loader/lib/css-base.js 56:24-55
 @ ../~/css-loader!../~/sass-loader/lib/loader.js!./client/css/_main.scss
 @ ./client/css/_main.scss
 @ ./client/pack.js

ERROR in ./client/css/_main.scss
Module build failed: ModuleNotFoundError: Module not found: Error: Can't resolve './convert-source-map' in '/Users/jeff/WebstormProjects/admin/node_modules/css-loader/lib'
    at factoryCallback (/Users/jeff/WebstormProjects/admin/node_modules/webpack/lib/Compilation.js:259:39)
    at /Users/jeff/WebstormProjects/admin/node_modules/webpack/lib/NormalModuleFactory.js:234:19
    at onDoneResolving (/Users/jeff/WebstormProjects/admin/node_modules/webpack/lib/NormalModuleFactory.js:59:20)
    at /Users/jeff/WebstormProjects/admin/node_modules/webpack/lib/NormalModuleFactory.js:126:20
    at /Users/jeff/WebstormProjects/admin/node_modules/async/dist/async.js:3694:9
    at /Users/jeff/WebstormProjects/admin/node_modules/async/dist/async.js:359:16
    at iteratorCallback (/Users/jeff/WebstormProjects/admin/node_modules/async/dist/async.js:933:13)
    at /Users/jeff/WebstormProjects/admin/node_modules/async/dist/async.js:843:16
    at /Users/jeff/WebstormProjects/admin/node_modules/async/dist/async.js:3691:13
    at apply (/Users/jeff/WebstormProjects/admin/node_modules/async/dist/async.js:21:25)
    at /Users/jeff/WebstormProjects/admin/node_modules/async/dist/async.js:56:12
    at /Users/jeff/WebstormProjects/admin/node_modules/webpack/lib/NormalModuleFactory.js:121:22
    at onResolved (/Users/jeff/WebstormProjects/admin/node_modules/enhanced-resolve/lib/Resolver.js:70:11)
    at loggingCallbackWrapper (/Users/jeff/WebstormProjects/admin/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
    at afterInnerCallback (/Users/jeff/WebstormProjects/admin/node_modules/enhanced-resolve/lib/Resolver.js:138:10)
    at loggingCallbackWrapper (/Users/jeff/WebstormProjects/admin/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
    at Resolver.applyPluginsAsyncSeriesBailResult1 (/Users/jeff/WebstormProjects/admin/node_modules/tapable/lib/Tapable.js:181:46)
    at innerCallback (/Users/jeff/WebstormProjects/admin/node_modules/enhanced-resolve/lib/Resolver.js:125:19)
    at loggingCallbackWrapper (/Users/jeff/WebstormProjects/admin/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
    at /Users/jeff/WebstormProjects/admin/node_modules/tapable/lib/Tapable.js:283:15
    at /Users/jeff/WebstormProjects/admin/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:38:4
    at loggingCallbackWrapper (/Users/jeff/WebstormProjects/admin/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
    at afterInnerCallback (/Users/jeff/WebstormProjects/admin/node_modules/enhanced-resolve/lib/Resolver.js:138:10)
    at loggingCallbackWrapper (/Users/jeff/WebstormProjects/admin/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
    at Resolver.applyPluginsAsyncSeriesBailResult1 (/Users/jeff/WebstormProjects/admin/node_modules/tapable/lib/Tapable.js:181:46)
    at innerCallback (/Users/jeff/WebstormProjects/admin/node_modules/enhanced-resolve/lib/Resolver.js:125:19)
    at loggingCallbackWrapper (/Users/jeff/WebstormProjects/admin/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)
    at /Users/jeff/WebstormProjects/admin/node_modules/tapable/lib/Tapable.js:283:15
    at innerCallback (/Users/jeff/WebstormProjects/admin/node_modules/enhanced-resolve/lib/Resolver.js:123:11)
    at loggingCallbackWrapper (/Users/jeff/WebstormProjects/admin/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19)

Here is a gist with my webpack.config.js:
https://gist.github.com/jeff-kilbride/e58a6831546efeb43fef8fae6b2d1da6

Downgrading to 0.26.4 resolves the issue. I have checked and the convert-source-map.js file does exist in my node_modules/css-loader/lib directory. I thought it might be related to #447, but I already have the fs: "empty" in my config.

Is there something I need to change in my config for 0.27.x?

@michael-ciniawsky
Copy link
Member

@jeff-kilbride Fixed by #452

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

Successfully merging a pull request may close this issue.

2 participants