-1

Scss Postcss issues

Hi found an issue with the postcss compilation error whereby the devdepencies compute the prefix output of the perfix.css as below:

internal/process/esm_loader.js:74 internalBinding('errors').triggerUncaughtException(
^Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'postcss' imported from C:....s\node_modules\postcss-cli\index.js at packageResolve (internal/modules/esm/resolve.js:655:9) at moduleResolve (internal/modules/esm/resolve.js:696:18) at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:810:11) at Loader.resolve (internal/modules/esm/loader.js:86:40) at Loader.getModuleJob (internal/modules/esm/loader.js:230:28) at ModuleWrap. (internal/modules/esm/module_job.js:56:40) at link (internal/modules/esm/module_job.js:55:36) { code: 'ERR_MODULE_NOT_FOUND' } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! -- prefix:css: postcss --use autoprefixer -b 'last 10 versions' css/style.concat.css -o css/style.prefix.css npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the natours@1.0.0 prefix:css script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.`

  • I’m voting to close this question because it is not really a question. – Christian Tapia Jan 16 '22 at 01:23
  • @marvin-buge welcome to SO, please take a look at [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) and if you have the answer to your question, don't publish into the question details, add the answer using the "Post your answer" button – Jose Lora Jan 24 '22 at 23:16
  • @joseLora i got it thanks – marvin Kurland Feb 03 '22 at 07:33

1 Answers1

0

Anyway, I found a simple solution to the problem:

  1. Just update your node js to the latest version.
  2. Reinstall autoprefixer after updating your node js application {npm install autoprefixer --save-dev}
  3. Reinstall your postcss npm install postcss-cli --save-dev
  4. Okay you will be ready to compile your Scss code. Hopefully, you will not face any issues compiling your output.