I wanna run my project by npm run watch
and when I do nothing, it suddenly appears an error like this.
git:(master) ✗ npm run watch
> watch
> npx mix watch
npm ERR! could not determine executable to run
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/bintangtobing/.npm/_logs/2021-06-04T08_11_16_499Z-debug.log
Does anyone know about these errors?
I have already did a solution,
it is
delete node_modules on the project folder and run an
npm install
and it still got the same error.
Can anyone help me, please?
Thank you, everyone.
asked Jun 4, 2021 at 8:16
3
It worked for me:
npm uninstall husky && npm install --save-dev husky@4
It happens because git is trying to find a file that doesn’t exist (in version 5) so downgrading helps, I know that’s not the best solution but could help someone.
Or try to migrate husky (4 to 7):
https://github.com/typicode/husky-4-to-7
answered Jul 28, 2021 at 13:36
3
In my case i was using wrong cmd .
npx create react-app assignment
cmd should be like
npx create-react-app my-project
mistake : I was missing «-» in between create and react in cmd
answered Apr 7, 2022 at 16:14
user9083933user9083933
3333 silver badges10 bronze badges
0
npm install
I had this problem after trying to debug a build issue. I deleted the node_modules and ran the app in a docker container. But this meant the husky npm package wasn’t available locally anymore so a simple npm install
fixed the problem
answered Oct 28, 2021 at 16:02
RooN3yRooN3y
1261 silver badge6 bronze badges
I had to downgrade node from v17.0.1 to v14.18.1, because newer node-version was not supported by one of my project’s dependencies.
( e.g. via «nvm use 14», see Node Version Manager )
answered Dec 3, 2021 at 13:51
AlexAlex
7397 silver badges7 bronze badges
1
My issue was is that I was mistakenly calling npx start
instead of npm start
.
I was doing this from the CMD
line in my Dockerfile
.
I realize this isn’t the OPs question, but the error and title may bring others here who are getting this error.
answered Jan 11, 2022 at 15:58
shmuelsshmuels
8711 gold badge7 silver badges19 bronze badges
1
It worked for me:
git commit -m "updating the dependency packages" --no-verify
Sometimes its due to pre-commit hooks
answered Mar 24, 2022 at 14:23
AnilSAnilS
7251 gold badge9 silver badges15 bronze badges
In my case, I was using npm build
.
It worked after changing to npm run build
.
answered Jun 23, 2022 at 12:13
laplacelaplace
5666 silver badges15 bronze badges
I was stuck on this error for a while. Very obvious, but I was simply running an invalid npx command.
The message by itself wasn’t very helpful and it took me quite some time to figure that out :'(
answered Sep 19, 2022 at 16:01
npm audit
fixed the issue for me while trying to run,
npx ng n <folder-name>
.
Angular was installed locally in this folder, which
already contained an Angular project.
answered Apr 17, 2022 at 7:36
Nice BooksNice Books
1,6192 gold badges17 silver badges21 bronze badges
I had tried installing npm in a repo that didn’t need it, and the installation had failed, therefore
rm -rf .git/hooks
without using
npm install
worked for me (because npm install
would fail again).
answered Jul 20, 2022 at 5:35
Error after installing cypress, ppening cypress with path works fine:
./node_modules/.bin/cypress open
answered Nov 2, 2022 at 12:44
tan jstan js
1441 silver badge9 bronze badges
npx react-native run-android
npm ERR! couldn’t determine execution to run this helped me to run
npm i yarn
yarn install
answered Nov 15, 2022 at 11:24
مصطفىمصطفى
4174 silver badges9 bronze badges
just use npm install
then -> npm start
answered Feb 24, 2022 at 7:17
This might be related to #1834
@rafgraph On windows, I had no issues for hooks to be installed with Husky. When I used WSL on Ubuntu though, I had to use sudo
for hooks to be installed, otherwise I had errors in the npm install log. So I don’t think this is strictly related, since the error above can be reproduced by simply running npx husky-run pre-commit
without hooks being installed at all.
@csvn can you try installing the latest beta & seeing if you can repro? npm i -g npm@next-7
. If you’re still experiencing this, we’d love the debug.log
Hi @darcyclarke. Attached the output for the debug.log
for the reproduction steps in the description.
0 verbose cli [
0 verbose cli '/usr/local/bin/node',
0 verbose cli '/usr/local/share/npm-global/lib/node_modules/npm/bin/npm-cli.js',
0 verbose cli 'exec',
0 verbose cli '--',
0 verbose cli 'husky-run',
0 verbose cli 'pre-commit'
0 verbose cli ]
1 info using npm@7.0.0-beta.12
2 info using node@v14.10.1
3 timing config:load:defaults Completed in 2ms
4 timing config:load:file:/usr/local/share/npm-global/lib/node_modules/npm/npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 0ms
8 timing config:load:file:/workspaces/npm-husky-test/.npmrc Completed in 0ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:/root/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/usr/local/etc/npmrc Completed in 1ms
13 timing config:load:global Completed in 1ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setEnvs Completed in 1ms
17 timing config:load Completed in 7ms
18 verbose npm-session 53798df1482fef51
19 timing npm:load Completed in 13ms
20 http fetch GET 200 https://registry.npmjs.org/husky-run 832ms
21 timing command:exec Completed in 840ms
22 verbose stack Error: could not determine executable to run
22 verbose stack at getBinFromManifest (/usr/local/share/npm-global/lib/node_modules/npm/lib/exec.js:210:23)
22 verbose stack at exec (/usr/local/share/npm-global/lib/node_modules/npm/lib/exec.js:98:15)
23 verbose cwd /workspaces/npm-husky-test
24 verbose Linux 4.19.128-microsoft-standard
25 verbose argv "/usr/local/bin/node" "/usr/local/share/npm-global/lib/node_modules/npm/bin/npm-cli.js" "exec" "--" "husky-run" "pre-commit"
26 verbose node v14.10.1
27 verbose npm v7.0.0-beta.12
28 error could not determine executable to run
29 verbose exit 1
I ran this within a Docker Devcontainer and WSL in VSCode. Environment info:
root@cc760b824422:/workspaces/npm-husky-test# npm -v
7.0.0-beta.12
root@cc760b824422:/workspaces/npm-husky-test# node -v
v14.10.1
This is the same for Windows, npm 7.0.0-beta.12
node v14.8.0
:
0 verbose cli [
0 verbose cli 'C:\Program Files\nodejs\node.exe',
0 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
0 verbose cli 'exec',
0 verbose cli '--',
0 verbose cli 'husky-run',
0 verbose cli 'pre-commit'
0 verbose cli ]
1 info using npm@7.0.0-beta.12
2 info using node@v14.8.0
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:C:Program Filesnodejsnode_modulesnpmnpmrc Completed in 0ms
5 timing config:load:builtin Completed in 0ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 1ms
8 timing config:load:file:C:UsersChristianDev@apptusesales-fashion.npmrc Completed in 1ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:C:UsersChristian.npmrc Completed in 1ms
11 timing config:load:user Completed in 1ms
12 timing config:load:file:C:Program Filesnodejsetcnpmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setEnvs Completed in 1ms
17 timing config:load Completed in 6ms
18 verbose npm-session 3e0f43b059d2f137
19 timing npm:load Completed in 15ms
20 http fetch GET 200 https://registry.npmjs.org/husky-run 85ms
21 timing command:exec Completed in 95ms
22 verbose stack Error: could not determine executable to run
22 verbose stack at getBinFromManifest (C:Program Filesnodejsnode_modulesnpmlibexec.js:210:23)
22 verbose stack at exec (C:Program Filesnodejsnode_modulesnpmlibexec.js:98:15)
23 verbose cwd C:UsersChristianDev@apptusesales-fashion
24 verbose Windows_NT 10.0.19041
25 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "exec" "--" "husky-run" "pre-commit"
26 verbose node v14.8.0
27 verbose npm v7.0.0-beta.12
28 error could not determine executable to run
29 verbose exit 1
the issue here is that npx
thinks you’re trying to run husky-run the package rather than husky-run
the bin script that’s part of husky.
what you’ll want to do to run the husky-run
script within husky
itself, is
which informs npx
which package contains the bin, and I can confirm works correctly
I get this same error could not determine executable to run
when running husky
as a pre-commit hook. Error log attached.
2020-10-02T00_36_01_041Z-debug.log
husky
was installed with npm v6 (because of #1834), the pre-commit hook successfully setup. It is setup in package.json
to run lint-staged
as described in prettier
docs. This works fine with npm v6
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*": "prettier --write --ignore-unknown"
}
@nlf running npx husky-run
is just for illustrating the problem. The real issue is that the hooks running with Husky fails when Husky executes them. So it is really the package that needs updating, if this issue is «working as intended». npx
with npm v6 managed to find /node_modules/.bin/husky-run
and run correctly. So this is a breaking change, and I was just curious if this is intended.
So in my mind, there are two options:
- Ensure that
npx <command>
can find scripts in/node_modules/.bin
if they match first - Update Husky so that it works with npm v7
I just wanted clarity which option is the right one, before opening an issue on Husky with this.
To add another data point, I think I’m running into the same issue with the vue-cli-service
bin script (which works in npm@6).
$ npx vue-cli-service serve
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/vue-cli-service - Not found
npm ERR! 404
npm ERR! 404 'vue-cli-service@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
$ npx vue serve
npm ERR! could not determine executable to run
Based on nlf’s comment there is a workaround until this is fixed in npm@7:
$ npx -p @vue/cli-service vue-cli-service serve
nlf
mentioned this issue
Oct 6, 2020
we published v7.0.0-rc.4 today that restores the old behavior of npx
with regards to already installed scripts and should resolve these issues.
you can update with npm i -g npm@next-7
and let us know how it goes!
Thanks @nlf! I can verify that my Husky hooks now works again, same as with npm v6.
Hi @nlf i still got error using npm v7.4.0
please open a new issue and be sure to fill out the template and i’ll see if i can help figure out what’s going on
Can confirm behaviour is working in 7.5.2
however I had to run npm rebuild
to re-install husky’s hooks. This may be helpful for you @hanifmhd
I got this issue with npx postcss
and fixed it by removing the dist
directory and running npx postcss
again.
I ran into the same bug after upgrading husky from version 4 to 5.
Installing new version of package wasn’t enough. The solution to fix this issue was to migrate husky to newer version.
There’s a helpful tool for this task: https://github.com/typicode/husky-4-to-5
the issue here is that
npx
thinks you’re trying to run husky-run the package rather thanhusky-run
the bin script that’s part of husky.what you’ll want to do to run the
husky-run
script withinhusky
itself, iswhich informs
npx
which package contains the bin, and I can confirm works correctly
Hi there,
I hope I’m not making a mistake by posting here but the quoted answer is for me the closest to a solution.
I’m pretty sure you got that right because if I check the log it said «http fetch GET 304 https://registry.npmjs.org/husky-run 201ms» so I reckon it is looking for a package instead of running the script.
But I’m using Nuxt and I’m not sure how I can fix this as the solution offered is for the npm cli. If anyone has an idea it will be really appreciated.
Thanks!
EDIT : after more research, I found this StackOverFlow thread : https://stackoverflow.com/questions/66246587/how-to-fix-error-not-found-husky-run-when-committing-new-code
So I tried :
rm -rf .git/hooks
npm install
Seems to work OK now. 👍
vedraan, vodenya, kaihendry, lixw1994, bruno-teksial, and KonstantinModin reacted with thumbs down emoji
ravindra-coditas, antpaw, Sabulski, and patrickxrivera reacted with laugh emoji
gblair, NathaEEUD, naeemba, davychhouk, Akachu, rulrok, DavidPerezS, mryechkin, SviataslauS, soujvnunes, and 14 more reacted with hooray emoji
Arattian, SviataslauS, soujvnunes, Passengerss, katerlouis, ravindra-coditas, antpaw, Sabulski, niwsa, erinoggz, and 2 more reacted with rocket emoji
@nlf running
npx husky-run
is just for illustrating the problem. The real issue is that the hooks running with Husky fails when Husky executes them. So it is really the package that needs updating, if this issue is «working as intended».npx
with npm v6 managed to find/node_modules/.bin/husky-run
and run correctly. So this is a breaking change, and I was just curious if this is intended.So in my mind, there are two options:
- Ensure that
npx <command>
can find scripts in/node_modules/.bin
if they match first- Update Husky so that it works with npm v7
I just wanted clarity which option is the right one, before opening an issue on Husky with this.
This was my issue! I had recently moved to a new machine and had forgotten to re-install npx
.
#while create new react app i am fcaing this issue
i have tried all command given above.
——>npx install create-react-app zoho
after given above cmd . i am facing below error
npm ERR! could not determine executable to run
npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersAdminAppDataLocalnpm-cache_logs2021-06-08T02_41_23_166Z-debug.log
I used npx tsc —init. Worked for me. Im on a linux machine, if that fact matters. I also have typescript installed globally with npm.
the issue here is that
npx
thinks you’re trying to run husky-run the package rather thanhusky-run
the bin script that’s part of husky.
what you’ll want to do to run thehusky-run
script withinhusky
itself, iswhich informs
npx
which package contains the bin, and I can confirm works correctlyHi there,
I hope I’m not making a mistake by posting here but the quoted answer is for me the closest to a solution.
I’m pretty sure you got that right because if I check the log it said «http fetch GET 304 https://registry.npmjs.org/husky-run 201ms» so I reckon it is looking for a package instead of running the script.
But I’m using Nuxt and I’m not sure how I can fix this as the solution offered is for the npm cli. If anyone has an idea it will be really appreciated.
Thanks!
EDIT : after more research, I found this StackOverFlow thread : https://stackoverflow.com/questions/66246587/how-to-fix-error-not-found-husky-run-when-committing-new-code
So I tried :rm -rf .git/hooks npm install
Seems to work OK now. 👍
This is NOT a good way to fix it.
In fact you will completely remove all git hooks you have setup, so naturally there will be nothing to run and thus it will produce no error.
Doesn’t that indicate the problem is the hooks themselves, and not npm?
Add "prepare": "husky install"
as a script to package.json
to fix it for everyone else when they will run npm install
, then run npm run prepare
to fix if for yourself.
( Note: this is done automatically for you when using the migration script here : https://github.com/typicode/husky-4-to-7 )
npm i yarn
yarn install
then run command again npx husky-run pre-commit
Are You Facing the Following error npm ERR! could not determine executable to run in nodejs? Then You are in right place. In this article, we will try to figure out how this error occurs and what are the possible fixes for this error. First of all, let’s explore how this error occurs.
Contents
- What is npm ERR! could not determine executable to run error?
- How To Fix npm ERR! could not determine executable to run Error?
- Solution 1: Reinstall husky
- Solution 2: Delete git hooks
- Conclusion
I am trying to run watch but the command fails with this error.
npm ERR! could not determine executable to run
How To Fix npm ERR! could not determine executable to run Error?
- How To Fix npm ERR! could not determine executable to run Error?
To Fix npm ERR! could not determine executable to run Error and solution is just to delete .git/hooks you can manually delete it or you can delete it by running this command: rm -rf .git/hooks then run: npm install now, your error will be solved.
- npm ERR! could not determine executable to run
This error might have happened cause of the husky. To Fix npm ERR! could not determine executable to run Error you need to uninstall husky and reinstall husky@4. To uninstall husky run this command: npm uninstall husky And now, You need to install husky 4 by running this command: npm install –save-dev husky@4 Now, your error will be solved. Thank you.
Solution 1: Reinstall husky
This error might have happened cause of the husky. To Fix npm ERR! could not determine executable to run Error you need to uninstall husky and reinstall husky@4. To uninstall husky run this command.
npm uninstall husky
And now, You need to install husky 4 by running this command.
npm install --save-dev husky@4
Now, your error will be solved. Thank you.
Solution 2: Delete git hooks
Another solution is just to delete .git/hooks you can manually delete it or you can delete it by running this command.
rm -rf .git/hooks
then run.
npm install
now, your error will be solved.
Conclusion
It’s all About this error. I hope We Have solved Your error. Comment below Your thoughts and your queries. Also, Comment below on which solution worked for you.
Also, Read
- dynamic import() which is available in all commonjs modules
- require() of ES modules is not supported using recharts
- java.lang.IllegalStateException: Failed to find fragment for React Root View
- error TS2677: A type predicate’s type must be assignable to its parameter’s type
- Xcode that doesn’t support iOS 15.6
Solution 1
It worked for me:
npm uninstall husky && npm install --save-dev [email protected]
It happens because git is trying to find a file that doesn’t exist (in version 5) so downgrading helps, I know that’s not the best solution but could help someone.
Or try to migrate husky (4 to 7):
https://github.com/typicode/husky-4-to-7
Solution 2
Ended up doing
rm -rf .git/hooks
npm install
Followin this sugestion https://github.com/npm/cli/issues/1845#issuecomment-814884999
Worked for me
Solution 3
npm install
I had this problem after trying to debug a build issue. I deleted the node_modules and ran the app in a docker container. But this meant the husky npm package wasn’t available locally anymore so a simple npm install
fixed the problem
Solution 4
My issue was is that I was mistakenly calling npx start
instead of npm start
.
I was doing this from the CMD
line in my Dockerfile
.
I realize this isn’t the OPs question, but the error and title may bring others here who are getting this error.
Solution 5
I had to downgrade node from v17.0.1 to v14.18.1, because newer node-version was not supported by one of my project’s dependencies.
( e.g. via «nvm use 14», see Node Version Manager )
Related videos on Youtube
02 : 09
NodeJS — npm install errors on Windows
02 : 28
[SOLVED] npm ERR! Unexpected end of JSON input while parsing near.
02 : 35
npm start not working / How to fix npm error React /npm start error node js /npm start in vs code
07 : 42
Reactjs npm error | npm start not working | npm start error while creating new project
07 : 55
npx create-react-app timeout problem | react installation problem | npx create-react-app not working
00 : 59
how to fix npm start problem in React.js || how to fix npm error in React.js Education Analysist
Comments
-
I wanna run my project by
npm run watch
and when I do nothing, it suddenly appears an error like this.git:(master) ✗ npm run watch > watch > npx mix watch npm ERR! could not determine executable to run npm ERR! A complete log of this run can be found in: npm ERR! /Users/bintangtobing/.npm/_logs/2021-06-04T08_11_16_499Z-debug.log
Does anyone know about these errors?
I have already did a solution,
it isdelete node_modules on the project folder and run an
npm install
and it still got the same error.Can anyone help me, please?
Thank you, everyone.-
Did you find a fix for this? I’m stuck too. If you could add an answer that would be very helpful.
-
I had to upgrade laravel-mix from 5 to 6 to fix this.
-
For those who get this error using Mikro-ORM: make sure you install mikro-orm cli
npm install --save @mikro-orm/cli
-
-
happened to me with firebase-tools. Had to downgrade node from v16 to v14
-
Reason why this works is that husky versions after 4 stopped installing git hooks automatically. They put up instructions how to add those here github.com/typicode/husky
-
this worked for me. Thank you very much. 🙏
-
for me it worked without uninstalling husky — so it may be safer this way
-
rm -rf .git/hooks
worked like a charm! -
This is exactly what my issue was. Thank you for posting this.
Recents
Related
I’ve worked a bit with nodejs in the past, but not extensively. Right now, I’m trying to get a few programs working, mainly «balena-etcher», and I’ve been getting various errors during the install.
Right now, simply typing npx help
gives an error «could not determine executable to run»
When I look at the log, things seem to be running smoothly until this point:
23 timing npm:load:projectScope Completed in 0ms
24 timing npm:load Completed in 9ms
25 timing config:load:flatten Completed in 1ms
26 timing command:exec Completed in 289ms
27 verbose stack Error: could not determine executable to run
27 verbose stack at Exec.getBinFromManifest (/usr/lib/node_modules/npm/lib/exec.js:330:25)
27 verbose stack at Exec._exec (/usr/lib/node_modules/npm/lib/exec.js:168:22)
28 verbose cwd /mnt/linuxDrive/daniel
29 verbose Linux 5.11.15-arch1-2
30 verbose argv "/usr/bin/node" "/usr/lib/node_modules/npm/bin/npm-cli.js" "exec" "--" "help"
31 verbose node v15.14.0
32 verbose npm v7.10.0
33 error could not determine executable to run
34 verbose exit 1
Any suggestions? I’m going to leave this here and head back over to Google.
Questions : npm ERR! could not determine executable to run
2023-02-06T12:56:51+00:00 2023-02-06T12:56:51+00:00
766
I wanna run my project by npm run watch and articles uvdos node.js when I do nothing, it suddenly appears an articles uvdos node.js error like this.
git:(master) ✗ npm run watch
> watch
> npx mix watch
npm ERR! could not determine executable to run
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/bintangtobing/.npm/_logs/2021-06-04T08_11_16_499Z-debug.log
Does anyone know about these errors?
I have already did a solution,
it is
delete node_modules on the project folder articles uvdos node.js and run an npm install and it still got the articles uvdos node.js same error.
Can anyone help me, please?
Thank you, articles uvdos node.js everyone.
Total Answers 10
32
Answers 1 : of npm ERR! could not determine executable to run
It worked for me:
npm uninstall husky && npm install --save-dev husky@4
It happens because git is trying to find post uvdos node.js a file that doesn’t exist (in version 5) post uvdos node.js so downgrading helps, I know that’s not post uvdos node.js the best solution but could help post uvdos node.js someone.
Or try to migrate husky (4 to 7):
https://github.com/typicode/husky-4-to-7
0
2023-02-06T12:56:51+00:00 2023-02-06T12:56:51+00:00Answer Link
mRahman
1
Answers 2 : of npm ERR! could not determine executable to run
Ended up doing
rm -rf .git/hooks
npm install
Followin this sugestion post uvdos node.js https://github.com/npm/cli/issues/1845#issuecomment-814884999
Worked for me
0
2023-02-06T12:56:51+00:00 2023-02-06T12:56:51+00:00Answer Link
joya
4
Answers 3 : of npm ERR! could not determine executable to run
npm install
I had this problem after trying to debug post uvdos node.js a build issue. I deleted the post uvdos node.js node_modules and ran the app in a docker post uvdos node.js container. But this meant the husky npm post uvdos node.js package wasn’t available locally anymore post uvdos node.js so a simple npm install fixed the post uvdos node.js problem
0
2023-02-06T12:56:51+00:00 2023-02-06T12:56:51+00:00Answer Link
yousuf
5
Answers 4 : of npm ERR! could not determine executable to run
I had to downgrade node from v17.0.1 to post uvdos node.js v14.18.1, because newer node-version was post uvdos node.js not supported by one of my project’s post uvdos node.js dependencies.
( e.g. via «nvm use 14», see Node post uvdos node.js Version Manager )
0
2023-02-06T12:56:51+00:00 2023-02-06T12:56:51+00:00Answer Link
joya
3
Answers 5 : of npm ERR! could not determine executable to run
My issue was is that I was mistakenly post uvdos node.js calling npx start instead of npm start.
I was doing this from the CMD line in my post uvdos node.js Dockerfile.
I realize this isn’t the OPs question, post uvdos node.js but the error and title may bring others post uvdos node.js here who are getting this error.
0
2023-02-06T12:56:51+00:00 2023-02-06T12:56:51+00:00Answer Link
joya
1
Answers 6 : of npm ERR! could not determine executable to run
It worked for me:
git commit -m "updating the dependency packages" --no-verify
Sometimes its due to pre-commit hooks
0
2023-02-06T12:56:51+00:00 2023-02-06T12:56:51+00:00Answer Link
karim
5
Answers 7 : of npm ERR! could not determine executable to run
In my case i was using wrong cmd .
npx post uvdos node.js create react-app assignment
cmd should be like
npx create-react-app post uvdos node.js my-project
mistake : I was missing «-» in between post uvdos node.js create and react in cmd
0
2023-02-06T12:56:51+00:00 2023-02-06T12:56:51+00:00Answer Link
karim
4
Answers 8 : of npm ERR! could not determine executable to run
npm audit fixed the issue for me while post uvdos node.js trying to run,
npx ng n post uvdos node.js <folder-name>.
Angular was installed locally in this post uvdos node.js folder, which
already contained an post uvdos node.js Angular project.
0
2023-02-06T12:56:51+00:00 2023-02-06T12:56:51+00:00Answer Link
joya
5
Answers 9 : of npm ERR! could not determine executable to run
In my case, I was using npm build.
It worked after changing to npm run post uvdos node.js build.
0
2023-02-06T12:56:51+00:00 2023-02-06T12:56:51+00:00Answer Link
karim
3
Answers 10 : of npm ERR! could not determine executable to run
just use npm install
then -> npm post uvdos node.js start
0
2023-02-06T12:56:51+00:00 2023-02-06T12:56:51+00:00Answer Link
rohim
Я хочу запустить свой проект до npm run watch
, и когда я ничего не делаю, внезапно появляется такая ошибка.
git:(master) ✗ npm run watch
> watch
> npx mix watch
npm ERR! could not determine executable to run
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/bintangtobing/.npm/_logs/2021-06-04T08_11_16_499Z-debug.log
Кто-нибудь знает об этих ошибках?
Я уже сделал решение, это
удалите node_modules в папке проекта и запустите
npm install
, и все равно возникнет та же ошибка.
Кто-нибудь может мне помочь? Всем спасибо.
12 ответов
В моем случае я использовал неправильный cmd. npx создает назначение приложения реакции
Cmd должно быть похоже мой проект npx create-react-app
Ошибка: мне не хватало «-» между созданием и реакцией в cmd
3
user9083933
7 Апр 2022 в 19:14
У меня сработало:
git commit -m "updating the dependency packages" --no-verify
Иногда это связано с хуками перед фиксацией
2
AnilS
24 Мар 2022 в 17:23
В моем случае я использовал npm build
.
Это сработало после перехода на npm run build
.
1
laplace
23 Июн 2022 в 15:13
npm audit
исправила проблему при попытке запуска, npx ng n <folder-name>
.
Angular был установлен локально в эту папку, которая уже содержала проект Angular.
0
Nice Books
17 Апр 2022 в 10:36
Я пытался установить npm в репозиторий, который в нем не нуждался, и установка не удалась, поэтому
rm -rf .git/hooks
без использования
npm install
Сработало для меня (потому что npm install
снова потерпит неудачу).
0
The Blind Hawk
20 Июл 2022 в 08:35
Просто используйте npm install
затем -> npm start
-1
Byomkesh
24 Фев 2022 в 10:17
У меня сработало:
npm uninstall husky && npm install --save-dev husky@4
Это происходит потому, что git пытается найти несуществующий файл (в версии 5), поэтому помогает понижение версии, я знаю, что это не лучшее решение, но может кому-то помочь.
Или попробуйте мигрировать хаски (4 на 7):
https://github.com/typicode/хаски-4-к-7
27
Erick Gutierrez
28 Июл 2021 в 17:13
npm install
У меня возникла эта проблема после попытки отладить проблему сборки. Я удалил node_modules и запустил приложение в контейнере Docker. Но это означало, что пакет Husky npm больше не был доступен локально, поэтому простой npm install
решил проблему.
7
RooN3y
28 Окт 2021 в 19:02
Мне пришлось понизить версию узла с версии 17.0.1 до версии 14.18.1, поскольку более новая версия узла не поддерживалась одной из зависимостей моего проекта.
(например, через «nvm use 14», см. Диспетчер версий узла)
4
Alex
3 Дек 2021 в 16:51
Моя проблема заключалась в том, что я по ошибке вызывал npx start
вместо npm start
.
Я делал это из строки CMD
в моем Dockerfile
.
Я понимаю, что это не вопрос ОП, но ошибка и заголовок могут привести сюда других, кто получает эту ошибку.
4
shmuels
11 Янв 2022 в 18:58
Если вы получили эту ошибку при работе с react.js, глобально установите react.js на свой компьютер, а затем пересоберите проект. Если ошибка все еще не устранена, удалите и переустановите node.js, надеюсь, это помогло
-2
Yusuf seçilmiş
30 Сен 2021 в 13:15