Cannot find module 'autoprefixer' in fresh Laravel 8 installation with nodejs 14
See original GitHub issueTry install using doc guidesTailwindcss
❯ laravel new laravel8
❯ cd $_
❯ npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/watchpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
up to date in 9.427s
50 packages are looking for funding
run `npm fund` for details
❯ npm install -D tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/watchpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ postcss@7.0.35
+ autoprefixer@9.8.6
+ @tailwindcss/postcss7-compat@2.0.1 (as tailwindcss)
updated 3 packages in 15.082s
47 packages are looking for funding
run `npm fund` for details
❯ npx tailwindcss init
npx: instaló 84 en 7.641s
Cannot find module 'autoprefixer'
Require stack:
- /home/abkrim/.npm/_npx/13483/lib/node_modules/tailwindcss/lib/cli/commands/build.js
- /home/abkrim/.npm/_npx/13483/lib/node_modules/tailwindcss/lib/cli/commands/index.js
- /home/abkrim/.npm/_npx/13483/lib/node_modules/tailwindcss/lib/cli/main.js
- /home/abkrim/.npm/_npx/13483/lib/node_modules/tailwindcss/lib/cli.js
❯ npx tailwindcss init
npx: instaló 84 en 7.635s
Cannot find module 'autoprefixer'
Require stack:
- /home/abkrim/.npm/_npx/13540/lib/node_modules/tailwindcss/lib/cli/commands/build.js
- /home/abkrim/.npm/_npx/13540/lib/node_modules/tailwindcss/lib/cli/commands/index.js
- /home/abkrim/.npm/_npx/13540/lib/node_modules/tailwindcss/lib/cli/main.js
- /home/abkrim/.npm/_npx/13540/lib/node_modules/tailwindcss/lib/cli.js
Ubuntu Focal, node 14 installedd trought nodesource
Apreciate help if not a bug.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Laravel 8 Installing Tailwind CSS ModuleBuildError
Here described what I did step by step 1.installed fresh laravel 8 using laravel installer. 2.run npm install. 3.then npm install tailwindcss@ ...
Read more >postcss-import 13 & tailwindcss 2 - Laracasts
I have a repository with Laravel 8 and Tailwind CSS v2, ... Then I simply used the package.json and webpack.mix.js from the fresh...
Read more >Laravel 9 fix Error: Cannot find module 'node:path' - YouTube
In this video I will show how to fix Error: Cannot find module 'node:path' in LaravelSubscribe our channel for videos like this ...
Read more >error: cannot find module 'vue' - You.com | The AI Search ...
2 Answers. Try to delete node_modules directory and then run npm install and then try tu use npm run build let me know...
Read more >Error: Loading PostCSS Plugin failed: Cannot find module 
node_modules/@vue/cli-service/node_modules/postcss-loader/src/index.js): Error: Loading PostCSS Plugin failed: Cannot find module 'autoprefixer' Require ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Try using
npx tailwindcss-cli@latest init -p
.There are also discussions in https://github.com/tailwindlabs/tailwindcss/issues/2957 for what actually caused this issue.
@jiaming10 Thanks it works!! 🤩