os win10
npm v8.1.0
node.js v17.0.1
yarnを入れようとしていた途中、一応npmの状態を調べようとした時 変なことが起きました
(は、内部コマンドまたは外部コマンド、
操作可能なプログラムまたはバッチ ファイルとして認識されていません。)と表示されるのに実行されます
それだけならいいのですがyarnを入れれません、失敗してしまいます原因がわからず調べても出てきません
この原因を知っている人はいませんか?
例
(base) C:\Users\PC_User>npm -v 'CALL "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g' は、内部コマンドまたは外部コマンド、 操作可能なプログラムまたはバッチ ファイルとして認識されていません。 8.1.0 (base) C:\Users\PC_User>npm 'CALL "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g' は、内部コマンドまたは外部コマンド、 操作可能なプログラムまたはバッチ ファイルとして認識されていません。 npm <command> Usage: npm install install all the dependencies in your project npm install <foo> add the <foo> dependency to your project npm test run this project's tests npm run <foo> run the script named <foo> npm <command> -h quick help on <command> npm -l display usage info for all commands npm help <term> search for help on <term> (in a browser) npm help npm more involved overview (in a browser) All commands: access, adduser, audit, bin, bugs, cache, ci, completion, config, dedupe, deprecate, diff, dist-tag, docs, doctor, edit, exec, explain, explore, find-dupes, fund, get, help, hook, init, install, install-ci-test, install-test, link, ll, login, logout, ls, org, outdated, owner, pack, ping, pkg, prefix, profile, prune, publish, rebuild, repo, restart, root, run-script, search, set, set-script, shrinkwrap, star, stars, start, stop, team, test, token, uninstall, unpublish, unstar, update, version, view, whoami Specify configs in the ini-formatted file: C:\Users\PC_User\.npmrc or on the command line via: npm <command> --key=value More configuration info: npm help config Configuration fields: npm help 7 config npm@8.1.0 C:\Program Files\nodejs\node_modules\npm (base) C:\Users\PC_User>npm install -g yarn 'CALL "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g' は、内部コマンドまたは外部コマンド、 操作可能なプログラムまたはバッチ ファイルとして認識されていません。 npm ERR! code ENOENT npm ERR! syscall spawn F:\pg\php-8.0.10-nts-Win32-vs16-x64 npm ERR! path C:\Users\PC_User\AppData\Roaming\npm\node_modules\yarn npm ERR! errno -4058 npm ERR! enoent spawn F:\pg\php-8.0.10-nts-Win32-vs16-x64 ENOENT npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\PC_User\AppData\Local\npm-cache\_logs\2022-03-14T23_59_39_107Z-debug.log
あなたの回答
tips
プレビュー