gulp-postcss: Cannot use without Autoprefixer

I 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)

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 16 (1 by maintainers)

Most upvoted comments

Try this:

npm cache clean
npm rb
npm i autoprefixer

Let me know what the output of this is.