Closed RavinduDharmasena closed 3 years ago
I cannot reproduce on Linux; so I'll need you to help me debug this.
If you edit node_modules\postcss-cli\index.js
line 64 to read console.warn(input)
and run again, what is the output?
This is the output that I have got after following your instructions.
[ 10, "versions'", 'css/style.concat.css' ]
TypeError: path.replace is not a function
at module.exports (G:\sass_course_projects\Natours_Media_Queries\node_modules\slash\index.js:10:14)
at Array.map (
at G:\sass_course_projects\Natours_Media_Queries\node_modules\postcss-cli\index.js:66:28
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! natours@1.0.0 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. npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ACER\AppData\Roaming\npm-cache_logs\2020-12-03T16_10_37_158Z-debug.log
My bad, I should have seen that from just looking at your initial post. Your problem is that you're using single quotes around last 10 versions
. Windows doesn't recognize single quotes as quotes on the command line; using double-quotes should make it work.
Also, you'll want to delete node_modules
and reinstall to undo the changes I requested.
Note to self: perhaps should cast to string before running through slash to give a more intelligent error message in this case.
It works when I Replaced single quotes with doubles quotes with escape characters as mentioned by you. Thank you so much for the solution.
When I try to to prefix a css using the command
postcss --use autoprefixer -b 'last 10 versions' style.concat.css -o css/style.prefix.css
, it throws following error.given below is the debug log file content