You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
My project uses webpack@3.10.0 and I am seeing the below error when I run webpack -p command to build my project.
ERROR in ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./stylesheets/main.scss
Module build failed: TypeError: Cannot read property 'length' of undefined
at module.exports (..\node_modules\postcss-value-parser\lib\unit.js:7:23)
at ..\node_modules\css-loader\node_modules\postcss-minify-gradients\dist\index.js:65:65
at Array.forEach (native)
at ..\node_modules\css-loader\node_modules\postcss-minify-gradients\dist\index.js:60:22
@sacredMonster I had this issue because i was doing @import inside my css files. You should import your global css files inside index.js. For some reason the new version of css-loader from react-scripts4.0.3 did not like this
Activity
MatellioRahul commentedon Oct 4, 2018
need this fixed soon.
alexander-akait commentedon Oct 5, 2018
Please provide example code what throw error
MatellioRahul commentedon Nov 27, 2018
can you please fix the unit.js file it raises error for value not defined.
code causing the problem
var length = value.length;
code fix
var length = value ? value.length : 0;
alexander-akait commentedon Nov 27, 2018
@MatellioRahul #36 (comment)
tp00012x commentedon Sep 8, 2021
@sacredMonster I had this issue because i was doing
@importinside my css files. You should import your global css files insideindex.js. For some reason the new version of css-loader fromreact-scripts4.0.3did not like this