質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
npm

npmは、Node Packaged Modulesの略。Node.jsのライブラリ・パッケージを管理できるツールです。様々なモジュールを簡単にインストールでき、自分でモジュールを作成し公開する際にも使用できます。

Node.js

Node.jsとはGoogleのV8 JavaScriptエンジンを使用しているサーバーサイドのイベント駆動型プログラムです。

Q&A

解決済

1回答

3534閲覧

npm audit fix --force時のエラー対応

skillUp

総合スコア25

npm

npmは、Node Packaged Modulesの略。Node.jsのライブラリ・パッケージを管理できるツールです。様々なモジュールを簡単にインストールでき、自分でモジュールを作成し公開する際にも使用できます。

Node.js

Node.jsとはGoogleのV8 JavaScriptエンジンを使用しているサーバーサイドのイベント駆動型プログラムです。

0グッド

0クリップ

投稿2021/09/05 13:58

編集2021/09/05 14:00

下記のエラーが出ているとき
このエラーを無くしたいのですが
どのような対応をすればよろしいでしょうか?

やったこと npm install --save-dev npm audit fix --force
エラー表示 PS C:\Users\user\pack_test\adminator> npm audit fix --force npm WARN using --force I sure hope you know what you are doing. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. > node-sass@6.0.1 install C:\Users\user\pack_test\adminator\node_modules\node-sass > node scripts/install.js Cached binary found at C:\Users\user\AppData\Roaming\npm-cache\node-sass\6.0.1\win32-x64-83_binding.node > node-sass@6.0.1 postinstall C:\Users\user\pack_test\adminator\node_modules\node-sass > node scripts/build.js Building: C:\Program Files\nodejs\node.exe C:\Users\user\pack_test\adminator\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= gyp info it worked if it ends with ok gyp verb cli [ gyp verb cli 'C:\Program Files\nodejs\node.exe', gyp verb cli 'C:\Users\user\pack_test\adminator\node_modules\node-gyp\bin\node-gyp.js', gyp verb cli 'rebuild', gyp verb cli '--verbose', gyp verb cli '--libsass_ext=', gyp verb cli '--libsass_cflags=', gyp verb cli '--libsass_ldflags=', gyp verb cli '--libsass_library=' gyp verb cli ] gyp info using node-gyp@7.1.2 gyp info using node@14.17.5 | win32 | x64 gyp verb command rebuild [] gyp verb command clean [] gyp verb clean removing "build" directory gyp verb command configure [] gyp verb find Python Python is not set from command line or npm configuration gyp verb find Python Python is not set from environment variable PYTHON gyp verb find Python checking if "python3" can be used gyp verb find Python - executing "python3" to get executable path gyp verb find Python - "python3" is not in PATH or produced an error gyp verb find Python checking if "python" can be used gyp verb find Python - executing "python" to get executable path gyp verb find Python - "python" is not in PATH or produced an error gyp verb find Python checking if "python2" can be used gyp verb find Python - executing "python2" to get executable path gyp verb find Python - "python2" is not in PATH or produced an error gyp verb find Python checking if Python is C:\Python37\python.exe gyp verb find Python - executing "C:\Python37\python.exe" to get version gyp verb find Python - "C:\Python37\python.exe" could not be run gyp verb find Python checking if Python is C:\Python27\python.exe gyp verb find Python - executing "C:\Python27\python.exe" to get version gyp verb find Python - "C:\Python27\python.exe" could not be run gyp verb find Python checking if the py launcher can be used to find Python gyp verb find Python - executing "py.exe" to get Python executable path gyp verb find Python - "py.exe" is not in PATH or produced an error gyp ERR! find Python gyp ERR! find Python Python is not set from command line or npm configuration gyp ERR! find Python Python is not set from environment variable PYTHON gyp ERR! find Python checking if "python3" can be used gyp ERR! find Python - "python3" is not in PATH or produced an error gyp ERR! find Python checking if "python" can be used gyp ERR! find Python - "python" is not in PATH or produced an error gyp ERR! find Python checking if "python2" can be used gyp ERR! find Python - "python2" is not in PATH or produced an error gyp ERR! find Python checking if Python is C:\Python37\python.exe gyp ERR! find Python - "C:\Python37\python.exe" could not be run gyp ERR! find Python checking if Python is C:\Python27\python.exe gyp ERR! find Python - "C:\Python27\python.exe" could not be run gyp ERR! find Python checking if the py launcher can be used to find Python gyp ERR! find Python - "py.exe" is not in PATH or produced an error gyp ERR! find Python gyp ERR! find Python ********************************************************** gyp ERR! find Python You need to install the latest version of Python. gyp ERR! find Python Node-gyp should be able to find and use Python. If not, gyp ERR! find Python you can try one of the following options: gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe" gyp ERR! find Python (accepted by both node-gyp and npm) gyp ERR! find Python - Set the environment variable PYTHON gyp ERR! find Python - Set the npm configuration variable python: gyp ERR! find Python npm config set python "C:\Path\To\python.exe" gyp ERR! find Python For more information consult the documentation at: gyp ERR! find Python https://github.com/nodejs/node-gyp#installation gyp ERR! find Python ********************************************************** gyp ERR! find Python gyp ERR! configure error gyp ERR! stack Error: Could not find any Python installation to use gyp ERR! stack at PythonFinder.fail (C:\Users\user\pack_test\adminator\node_modules\node-gyp\lib\find-python.js:302:47) gyp ERR! stack at PythonFinder.runChecks (C:\Users\user\pack_test\adminator\node_modules\node-gyp\lib\find-python.js:136:21) gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\user\pack_test\adminator\node_modules\node-gyp\lib\find-python.js:200:18) gyp ERR! stack at PythonFinder.execFileCallback (C:\Users\user\pack_test\adminator\node_modules\node-gyp\lib\find-python.js:266:16) gyp ERR! stack at exithandler (child_process.js:397:5) gyp ERR! stack at ChildProcess.errorhandler (child_process.js:409:5) gyp ERR! stack at ChildProcess.emit (events.js:400:28) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! stack at onErrorNT (internal/child_process.js:467:16) gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:82:21) gyp ERR! System Windows_NT 10.0.19043 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\user\pack_test\adminator\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd C:\Users\user\pack_test\adminator\node_modules\node-sass gyp ERR! node -v v14.17.5 gyp ERR! node-gyp -v v7.1.2 gyp ERR! not ok Build failed with error code: 1 npm WARN acorn-import-assertions@1.7.6 requires a peer of acorn@^8 but none is installed. You must install peer dependencies yourself. npm WARN extract-text-webpack-plugin@3.0.2 requires a peer of webpack@^3.1.0 but none is installed. You must install peer dependencies yourself. + node-sass@6.0.1 + webpack-dev-server@4.1.0 added 52 packages from 21 contributors, removed 86 packages, updated 28 packages and moved 2 packages in 23.304s run `npm fund` for details fixed 7 of 12 vulnerabilities in 1693 scanned packages 5 vulnerabilities required manual review and could not be updated 2 package updates for 7 vulnerabilities involved breaking changes (installed due to `--force` option) PS C:\Users\user\pack_test\adminator> node -v v14.17.5

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

--forceをつけて実行しないほうがエラーも起こらなく
後々問題が起きなくて済むようだったので実行しないことにしました。

投稿2021/09/24 00:28

skillUp

総合スコア25

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問