[1.0] Uncaught Error: Cannot find module "../css/xxx.css"
See original GitHub issueHi there. I have a problem with CSS importing on my production Gatsby blog.
After building and deploying (using Surge) I get the following error :
layout-component---index-ab013f8….js:6 Uncaught Error: Cannot find module "../css/reset.css"
at layout-component---index-ab013f8….js:sourcemap:6
at Object../node_modules/babel-loader/lib/index.js?{"plugins":["/Users/nbazille/www/m6web.github.io/node_modules/gatsby/dist/utils/babel-plugin-extract-graphql.js","/Users/nbazille/www/m6web.github.io/node_modules/babel-plugin-add-module-exports/lib/index.js","/Users/nbazille/www/m6web.github.io/node_modules/babel-plugin-add-module-exports/lib/index.js","/Users/nbazille/www/m6web.github.io/node_modules/babel-plugin-transform-object-assign/lib/index.js"],"presets":["/Users/nbazille/www/m6web.github.io/node_modules/babel-preset-env/lib/index.js","/Users/nbazille/www/m6web.github.io/node_modules/babel-preset-stage-0/lib/index.js","/Users/nbazille/www/m6web.github.io/node_modules/babel-preset-react/lib/index.js"],"cacheDirectory":true}!./src/layouts/index.js (layout-component---index-ab013f8….js:sourcemap:6)
at t (bootstrap 8345445…:52)
at index.js?568e:11
at production-app.js:161
at index.js?568e:11
at c (patch.js:18)
at patch.js:39
at window.webpackJsonp (bootstrap 8345445…:20)
at layout-component---index-ab013f8….js:sourcemap:1
The reset.css file is imported in the template/index.js file. Everything works in develop mode. The build command don’t fail.
The weirdest thing is that I got this error few days ago and it disappeared few days after. This error surfaced again today.
I compared with the gatsby/www source code and I didn’t see any big differences about it with my project.
If someone can help me on this I will be very grateful.
Production : http://m6webtech.surge.sh/ Github project : https://github.com/oltodo/m6web.github.io/tree/v2
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:19 (14 by maintainers)
Top Results From Across the Web
footer.js:11 uncaught error: cannot find module 'vue/dist/vue.js'
Hi there. I have a problem with CSS importing on my production Gatsby blog. After building and deploying (using Surge) I get the...
Read more >Webpack wrong relative path in css and html - Stack Overflow
It will be better if there's some nice solution to resolve the relative path according to the folder structure automatically. Share.
Read more >vue中loading chunk-xxx.css failed和net::ERR_ABORTED 404 ...
就是显示xx.css文件找不到,前端页面报错,页面的数据信息也渲染不出来。 但是,奇怪的是根据报错的路径,去查看chunk-xxx.css文件,发现这个文件是存在的 ...
Read more >BB Code [table] [Archive] - vBulletin.org Forum
Defines the aditional css class of the whole table. Possible values have to be ... Fatal error: Call to undefined function: bcmod() in ......
Read more >FoxPro in the Cloud with FoxInCloud
Version Released Benefit Contributor...
Future (see history below) Future (see history below) Future (see history below)
3.0.1 TBA Support extension M. Vincent...
Support extension M. Vincent......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok, I’ve isolated the problem to
normalize.cssin my case, which could possibly be generalized to any 3rd party CSS library installed and imported vianpm/yarn.Having an
@import 'normalize.css';anywhere in an imported CSS file breaks the build in production. Oddly, it still applies the Normalize styles, but blocks rendering of any child pages (doesn’t affect the home page).😮 This comment solved my case ! As @alampros mentioned, the problem seems to be coming from a bad dependencies handling.