Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Module build failed: TypeError: Cannot read property 'relative' of undefined #45

Closed
F21 opened this issue Feb 1, 2016 · 4 comments
Closed
Labels

Comments

@F21
Copy link

F21 commented Feb 1, 2016

I ran into this error after upgrading to 4.0.0 with my webpack build:

ERROR in ./~/css-loader!./~/postcss-loader!./~/normalize.css/normalize.css
Module build failed: TypeError: Cannot read property 'relative' of undefined
    at C:\Users\user\Desktop\postcss-assets-4.0.0-error\node_modules\postcss-assets\index.js:32:20
    at LazyResult.run (C:\Users\user\Desktop\postcss-assets-4.0.0-error\node_modules\postcss\lib\lazy-result.js:206:20)
    at C:\Users\user\Desktop\postcss-assets-4.0.0-error\node_modules\postcss\lib\lazy-result.js:120:37
    at LazyResult.asyncTick (C:\Users\user\Desktop\postcss-assets-4.0.0-error\node_modules\postcss\lib\lazy-result.js:134:15)
    at processing.Promise.then._this2.processed (C:\Users\user\Desktop\postcss-assets-4.0.0-error\node_modules\postcss\lib\lazy-result.js:160:20)
    at LazyResult.async (C:\Users\user\Desktop\postcss-assets-4.0.0-error\node_modules\postcss\lib\lazy-result.js:157:27)
    at LazyResult.then (C:\Users\user\Desktop\postcss-assets-4.0.0-error\node_modules\postcss\lib\lazy-result.js:79:21)
    at Object.module.exports (C:\Users\user\Desktop\postcss-assets-4.0.0-error\node_modules\postcss-loader\index.js:47:32)
 @ ./~/normalize.css/normalize.css 4:14-96

To reproduce, simply clone this repo: https://github.com/F21/postcss-assets-4.0.0-error

Then run npm install and npm run build.

@ai
Copy link
Contributor

ai commented Feb 1, 2016

@F21 You can fix issue by sending empty { } options.

@borodean I had this issue too. Can you add check if ( !opts ) opts = { }?

@borodean
Copy link
Owner

borodean commented Feb 1, 2016

@F21 thanks for reporting, checking it out now.

@borodean
Copy link
Owner

borodean commented Feb 1, 2016

@F21 fixed in 4.0.1.

@borodean borodean closed this as completed Feb 1, 2016
@borodean borodean added the bug label Feb 1, 2016
@F21
Copy link
Author

F21 commented Feb 2, 2016

Thanks! :)

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

No branches or pull requests

3 participants