After successfully installing autoprefixer and postcss-cli, I embarked on setting up a simple build process with NPM scripts using my command prompt and VS code. As someone with only 2 months of coding experience, I was following a tutorial on CSS/SASS topics to enhance my skills but debugging still remains a challenge for me. Despite completing the desired code, I encountered difficulties in compiling everything into a compressed style.css document due to issues with prefixing.
In an attempt to resolve this issue, I entered the command npm run prefix:css
which triggered the script:
postcss --use autoprefixer -b 'last 10 versions' css/style.concat.css -o css/style.prefix.css
The output displayed:
TypeError: Patterns must be a string or an array of strings
at assertPatternsInput (C:\Users\mjpry\Desktop\advanced-css-course master\Natours\starter\node_modules\globby\index.js:17:9)
at generateGlobTasks (C:\Users\mjpry\Desktop\advanced-css-course-master\Natours\starter\node_modules\globby\index.js:42:2)
at module.exports (C:\Users\mjpry\Desktop\advanced-css-course-master\Natours\starter\node_modules\globby\index.js:116:20)
at C:\Users\mjpry\Desktop\advanced-css-course-master\Natours\starter\node_modules\postcss-cli\index.js:59:14
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] 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 [email protected] 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\mjpry\AppData\Roaming\npm-cache\_logs\2020-01-29T23_00_22_951Z-debug.log
Given my limited experience, I am unable to troubleshoot this error effectively. Although it appears to relate to Node_Modules, I am uncertain about the next steps to take. Any assistance would be greatly appreciated!