question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find module 'autoprefixer' in fresh Laravel 8 installation with nodejs 14

See original GitHub issue

Try 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:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

15reactions
jiaming10commented, Dec 4, 2020

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.

0reactions
Shrroycommented, Jun 1, 2021

@jiaming10 Thanks it works!! 🤩

Read more comments on GitHub >

github_iconTop 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 &#3
node_modules/@vue/cli-service/node_modules/postcss-loader/src/index.js): Error: Loading PostCSS Plugin failed: Cannot find module 'autoprefixer' Require ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found