Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Postcss-cli cannot find flexbugs-fixes module (finds autoprefixer with no problems though)

I installed postcss-cli autoprefixer and postcss-flexbugs-fixes in my project via npm. There were unmet dep warnings for pff but it did install. I know my postcss and cli is working because when I run

postcss --use autoprefixer index.scss

from terminal it works just fine - i have some dummy css in there anyway just to rule out syntax errors.

When I run

postcss --use postcss-flexbugs-fixes index.scss

I get an error saying cannot find module postcss-flexbugs-fixes. It's probably worth mentioning I'm on node 4.4.5 but I've had postcss-flexbugs-fixes work before on this version of node, the only difference (including version numbers) being it was wrapped inside a gulp task. Here is the full error:

Error: Cannot find module 'postcss-flexbugs-fixes'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at /Users/ohu275/.nvm/versions/node/v4.4.5/lib/node_modules/postcss-cli/index.js:107:14
at Array.map (native)
at Object.<anonymous> (/Users/ohu275/.nvm/versions/node/v4.4.5/lib/node_modules/postcss-cli/index.js:100:24)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)

I'm ultimately trying to get to a point where I can run my postcss tasks via an npm build script. I've got autoprefixer working but no dice with the flexbugs-fixes via postcss-cli. I have to think I'm doing something wrong because I've had this particular plugin work before, just not with the cli. Other plugins are working with my cli. Any help would be much appreciated.

like image 305
rakitin Avatar asked Jul 19 '26 04:07

rakitin


1 Answers

npm install -D postcss-flexbugs-fixes  

and

npm install -D postcss-preset-env   
like image 104
Aindriú Avatar answered Jul 22 '26 01:07

Aindriú



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!