Autoprefixer should come installed with Laravel Mix. Did you npm install?
Dec 28, 2021
23
Level 1
Error Installing Jetstream
I'm installing a fresh project with Jetstream. I'm getting the following error at 'npm run dev' and I have not been able to find any solutions to overcome it.
Node Version : 17.3 NPM Version: 8.3
Mix
Compiled with some errors in 1.22s
ERROR in ./resources/css/app.css
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
Error: Cannot find module 'autoprefixer'
Require stack:
- /home/x/postcss.config.js
- /home/x/public_html/lpa-jet/node_modules/cosmiconfig/dist/loaders.js
- /home/x/public_html/lpa-jet/node_modules/cosmiconfig/dist/ExplorerBase.js
- /home/x/public_html/lpa-jet/node_modules/cosmiconfig/dist/Explorer.js
- /home/x/public_html/lpa-jet/node_modules/cosmiconfig/dist/index.js
- /home/x/public_html/lpa-jet/node_modules/postcss-loader/dist/utils.js
- /home/x/public_html/lpa-jet/node_modules/postcss-loader/dist/index.js
- /home/x/public_html/lpa-jet/node_modules/postcss-loader/dist/cjs.js
- /home/x/public_html/lpa-jet/node_modules/webpack/lib/ProgressPlugin.js
- /home/x/public_html/lpa-jet/node_modules/webpack/lib/index.js
- /home/x/public_html/lpa-jet/node_modules/webpack-cli/lib/webpack-cli.js
- /home/x/public_html/lpa-jet/node_modules/webpack-cli/lib/bootstrap.js
- /home/x/public_html/lpa-jet/node_modules/webpack-cli/bin/cli.js
- /home/x/public_html/lpa-jet/node_modules/webpack/bin/webpack.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/x/postcss.config.js:1:22)
at Module._compile (node:internal/modules/cjs/loader:1097:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:999:19)
at processResult (/home/x/public_html/lpa-jet/node_modules/webpack/lib/NormalModule.js:751:19)
at /home/x/public_html/lpa-jet/node_modules/webpack/lib/NormalModule.js:853:5
at /home/x/public_html/lpa-jet/node_modules/loader-runner/lib/LoaderRunner.js:399:11
at /home/x/public_html/lpa-jet/node_modules/loader-runner/lib/LoaderRunner.js:251:18
at context.callback (/home/x/public_html/lpa-jet/node_modules/loader-runner/lib/LoaderRunner.js:124:13)
at Object.loader (/home/x/public_html/lpa-jet/node_modules/postcss-loader/dist/index.js:56:7)
1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
Level 1
I did some more digging this morning. Looks like I had a stray composer.json in my home directory. I deleted that and if finally ran with out error. Thank you all for your help!
Please or to participate in this conversation.