Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npx install init -p shows error !!! #8067

Closed
2 tasks done
Ved0715 opened this issue Jan 28, 2025 · 2 comments
Closed
2 tasks done

npx install init -p shows error !!! #8067

Ved0715 opened this issue Jan 28, 2025 · 2 comments
Labels
Bug thing that needs fixing Needs Triage needs review for next steps

Comments

@Ved0715
Copy link

Ved0715 commented Jan 28, 2025

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

0 verbose cli /usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js
1 info using [email protected]
2 info using [email protected]
3 silly config load:file:/usr/local/lib/node_modules/npm/npmrc
4 silly config load:file:/Users/vedant/Documents/MERN Projects/Image Generator/my-app/.npmrc
5 silly config load:file:/Users/vedant/.npmrc
6 silly config load:file:/usr/local/etc/npmrc
7 verbose title npm exec tailwindcss init
8 verbose argv "exec" "--" "tailwindcss" "init"
9 verbose logfile logs-max:10 dir:/Users/vedant/.npm/_logs/2025-01-28T10_47_18_297Z-
10 verbose logfile /Users/vedant/.npm/_logs/2025-01-28T10_47_18_297Z-debug-0.log
11 silly logfile start cleaning logs, removing 1 files
12 silly logfile done cleaning log files
13 silly packumentCache heap:2197815296 maxSize:549453824 maxEntrySize:274726912
14 verbose stack Error: could not determine executable to run
14 verbose stack at getBinFromManifest (/usr/local/lib/node_modules/npm/node_modules/libnpmexec/lib/get-bin-from-manifest.js:17:23)
14 verbose stack at exec (/usr/local/lib/node_modules/npm/node_modules/libnpmexec/lib/index.js:202:15)
14 verbose stack at async Npm.exec (/usr/local/lib/node_modules/npm/lib/npm.js:207:9)
14 verbose stack at async module.exports (/usr/local/lib/node_modules/npm/lib/cli/entry.js:69:5)
15 verbose pkgid [email protected]
16 error could not determine executable to run
17 verbose cwd /Users/vedant/Documents/MERN Projects/Image Generator/my-app
18 verbose os Darwin 24.1.0
19 verbose node v23.6.1
20 verbose npm v11.0.0
21 verbose exit 1
22 verbose code 1
23 error A complete log of this run can be found in: /Users/vedant/.npm/_logs/2025-01-28T10_47_18_297Z-debug-0.log

vedant@Vedants-MacBook-Pro my-app % npx tailwindcss init
npm error could not determine executable to run
npm error A complete log of this run can be found in: /Users/vedant/.npm/_logs/2025-01-28T10_47_18_297Z-debug-0.log

Expected Behavior

npx tailwindcss init or npm tailwinds init -p
should create tailwind.confing.js file.

I am not sure what is the problem few days back it worked for me not it is not working.

I have done all the required installations properly

npm create vite@latest my-app -- --template react
cd my-app
npm install -D tailwindcss postcss autoprefixer

I thought there is a problem with node and npm version . so I even upgraded both to latest version.

Steps To Reproduce

  1. Creating a vate react app: npm create vite@latest my-app -- --template react
  2. cd my-app
  3. Installing tailwindcss and dependent packages: npm install -D tailwindcss postcss autoprefixer
  4. npm tailwinds init -p shows the error
    npm error could not determine executable to run
    npm error A complete log of this run can be found in: /Users/vedant/.npm/_logs/2025-01-28T10_47_18_297Z-debug-0.log

2025-01-28T10_47_18_297Z-debug-0.log. contain :

0 verbose cli /usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js
1 info using [email protected]
2 info using [email protected]
3 silly config load:file:/usr/local/lib/node_modules/npm/npmrc
4 silly config load:file:/Users/vedant/Documents/MERN Projects/Image Generator/my-app/.npmrc
5 silly config load:file:/Users/vedant/.npmrc
6 silly config load:file:/usr/local/etc/npmrc
7 verbose title npm exec tailwindcss init
8 verbose argv "exec" "--" "tailwindcss" "init"
9 verbose logfile logs-max:10 dir:/Users/vedant/.npm/_logs/2025-01-28T10_47_18_297Z-
10 verbose logfile /Users/vedant/.npm/_logs/2025-01-28T10_47_18_297Z-debug-0.log
11 silly logfile start cleaning logs, removing 1 files
12 silly logfile done cleaning log files
13 silly packumentCache heap:2197815296 maxSize:549453824 maxEntrySize:274726912
14 verbose stack Error: could not determine executable to run
14 verbose stack     at getBinFromManifest (/usr/local/lib/node_modules/npm/node_modules/libnpmexec/lib/get-bin-from-manifest.js:17:23)
14 verbose stack     at exec (/usr/local/lib/node_modules/npm/node_modules/libnpmexec/lib/index.js:202:15)
14 verbose stack     at async Npm.exec (/usr/local/lib/node_modules/npm/lib/npm.js:207:9)
14 verbose stack     at async module.exports (/usr/local/lib/node_modules/npm/lib/cli/entry.js:69:5)
15 verbose pkgid [email protected]
16 error could not determine executable to run
17 verbose cwd /Users/vedant/Documents/MERN Projects/Image Generator/my-app
18 verbose os Darwin 24.1.0
19 verbose node v23.6.1
20 verbose npm  v11.0.0
21 verbose exit 1
22 verbose code 1
23 error A complete log of this run can be found in: /Users/vedant/.npm/_logs/2025-01-28T10_47_18_297Z-debug-0.log 

Environment

  • npm: 11.0.0
  • Node.js: 23.6.1
  • OS Name: macOS
  • npm config:
; node bin location = /usr/local/bin/node
; node version = v23.6.1
; npm local prefix = /Users/s/Documents/Projects/project/my-app
; npm version = 11.0.0
; cwd = /Users/s/Documents/Projects/project/my-app
; HOME = /Users/s
; Run `npm config ls -l` to show all defaults.
@Ved0715 Ved0715 added Bug thing that needs fixing Needs Triage needs review for next steps labels Jan 28, 2025
@milaninfy
Copy link
Contributor

milaninfy commented Jan 28, 2025

@Ved0715 I don't think this is npm issue.

~/workarea/rep $ cd my-app 
~/workarea/rep/my-app $ npm install -D tailwindcss postcss autoprefixer

added 264 packages, and audited 265 packages in 13s

110 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
~/workarea/rep/my-app $ npm ls tailwindcss
[email protected] /Users/milaninfy/workarea/rep/my-app
└── [email protected]

This appears to be related to tailwindcss versions and not with npm.

tailwindcss version 4 doesn't have binary name tailwindcss

~/workarea/rep/my-app $ npm view [email protected] bin
{ tailwind: 'lib/cli.js', tailwindcss: 'lib/cli.js' }
~/workarea/rep/my-app $ npm view tailwindcss@latest bin
~/workarea/rep/my-app $ 

you might want to checkout this documentation https://v1.tailwindcss.com/docs/installation#create-your-tailwind-config-file

@Ved0715
Copy link
Author

Ved0715 commented Jan 28, 2025

@milaninfy got it tailwindcss has suddenly moved from v3 to v4 with some major changes.

Solved it by downgrading to v3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps
Projects
None yet
Development

No branches or pull requests

2 participants