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

TypeError: Cannot read property 'modules' of undefined #188

Closed
tu4mo opened this issue Aug 14, 2019 · 7 comments · Fixed by #190
Closed

TypeError: Cannot read property 'modules' of undefined #188

tu4mo opened this issue Aug 14, 2019 · 7 comments · Fixed by #190
Labels

Comments

@tu4mo
Copy link

tu4mo commented Aug 14, 2019

I'm getting an error building my project on Windows, everything works fine on a Mac.

[!] (plugin postcss) TypeError: Cannot read property 'modules' of undefined
TypeError: Cannot read property 'modules' of undefined
    at getExtracted (C:\sg\node_modules\rollup-plugin-postcss\dist\index.js:771:60)
    at C:\sg\node_modules\rollup-plugin-postcss\dist\index.js:814:29
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (C:\sg\node_modules\rollup-plugin-postcss\dist\index.js:19:24)
    at _next (C:\sg\node_modules\rollup-plugin-postcss\dist\index.js:41:9)
    at C:\sg\node_modules\rollup-plugin-postcss\dist\index.js:48:7
    at new Promise (<anonymous>)
    at C:\sg\node_modules\rollup-plugin-postcss\dist\index.js:37:12
    at Object.generateBundle (C:\sg\node_modules\rollup-plugin-postcss\dist\index.js:859:9)
    at Promise.resolve.then (C:\sg\node_modules\rollup\dist\rollup.js:15921:25)
@tu4mo
Copy link
Author

tu4mo commented Aug 14, 2019

Error goes away when I remove preserveModules from config.

@kirill-yatsy
Copy link

kirill-yatsy commented Oct 8, 2019

Problem in generateBundle(opts, bundle)
bundle[path.relative(dir, file)].modules
For example my case:
path.relative(dir, file) - is "InjectStyles\index.js"
bundle contains almost same key "InjectStyles/index.js"
difference only in / and \

@kirill-yatsy
Copy link

Problem reproduce only in windows

@tu4mo
Copy link
Author

tu4mo commented Oct 8, 2019

#190 probably would fix this.

@tu4mo
Copy link
Author

tu4mo commented Nov 19, 2019

@egoist Any chance you could take a look at this?

@jlkiri
Copy link

jlkiri commented Nov 23, 2019

I get the same error on Windows. That PR should fix it.

@egoist
Copy link
Owner

egoist commented Feb 3, 2020

🎉 This issue has been resolved in version 2.0.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@egoist egoist added the released label Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants