Cannot use without Autoprefixer
See original GitHub issueI don’t require or use autoprefixer in anywhere but I still get this error. When I still don’t use or require autoprefixer but install it, everything works fine.
module.js:341
throw err;
^
Error: Cannot find module 'autoprefixer'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.autoprefixer (C:\somepath\node_modules\postcss-cssnext\lib\features.js:126:12)
at C:\somepath\node_modules\postcss-cssnext\lib\index.js:70:44
at Array.forEach (native)
at C:\somepath\node_modules\postcss-cssnext\lib\index.js:56:35
at creator (C:\somepath\node_modules\postcss\lib\postcss.js:60:39)
at Function.postcss.plugin (C:\somepath\node_modules\postcss\lib\postcss.js:66:23)
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (1 by maintainers)
Top Results From Across the Web
getting "Cannot find module 'autoprefixer'" error during setup ...
at first I faced “Cannot find module 'autoprefixer'” error during setup. than I tried "yarn" instead of "npm".
Read more >Autoprefixer - Best of JS
PostCSS plugin to parse CSS and add vendor prefixes to CSS rules using values from Can I Use. It is recommended by Google...
Read more >autoprefixer - npm
PostCSS plugin to parse CSS and add vendor prefixes to CSS rules using values from Can I Use. It is recommended by Google...
Read more >autoprefixer | Yarn - Package Manager
It is recommended by Google and used in Twitter and Alibaba. Write your CSS rules without vendor prefixes (in fact, forget about them...
Read more >An Introduction to PostCSS - SitePoint
Similarly, you can't stop developers using options you'd rather avoid ... PostCSS is not necessarily faster or more lightweight than using a ...
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
Try this:
Let me know what the output of this is.
As mentioned earlier,
autoprefixer
is a dependency ofpostcss-cssnext
plugin, so this issue is probably connected to windows environment and/or node/npm version, but not gulp-postcss, because it doesn’t have these dependencies.