laravel vueプロジェクトでnpmインストールを実行できません
P粉566048790
P粉566048790 2023-08-30 18:30:39
0
1
457
<p>我正在为我的 <strong>laravel vue 项目</strong>执行<strong>npm install</strong>。但 npm install 显示以下错误:</p> <pre class="brush:php;toolbar:false;">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 &quot;python3&quot; can be used gyp verb find Python - executing &quot;python3&quot; to get executable path gyp verb find Python - &quot;python3&quot; is not in PATH or produced an error gyp verb find Python checking if &quot;python&quot; can be used gyp verb find Python - executing &quot;python&quot; to get executable path gyp verb find Python - &quot;python&quot; is not in PATH or produced an error gyp verb find Python checking if &quot;python2&quot; can be used gyp verb find Python - executing &quot;python2&quot; to get executable path gyp verb find Python - &quot;python2&quot; 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 &quot;C:\Python37\python.exe&quot; to get version gyp verb find Python - &quot;C:\Python37\python.exe&quot; could not be run gyp verb find Python checking if Python is C:\Python27\python.exe gyp verb find Python - executing &quot;C:\Python27\python.exe&quot; to get version gyp verb find Python - &quot;C:\Python27\python.exe&quot; could not be run gyp verb find Python checking if the py launcher can be used to find Python gyp verb find Python - executing &quot;py.exe&quot; to get Python executable path gyp verb find Python - &quot;py.exe&quot; 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 &quot;python3&quot; can be used gyp ERR! find Python - &quot;python3&quot; is not in PATH or produced an error gyp ERR! find Python checking if &quot;python&quot; can be used gyp ERR! find Python - &quot;python&quot; is not in PATH or produced an error gyp ERR! find Python checking if &quot;python2&quot; can be used gyp ERR! find Python - &quot;python2&quot; is not in PATH or produced an error gyp ERR! find Python checking if Python is C:\Python37\python.exe gyp ERR! find Python - &quot;C:\Python37\python.exe&quot; could not be run gyp ERR! find Python checking if Python is C:\Python27\python.exe gyp ERR! find Python - &quot;C:\Python27\python.exe&quot; could not be run gyp ERR! find Python checking if the py launcher can be used to find Python gyp ERR! find Python - &quot;py.exe&quot; 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=&quot;C:\Path\To\python.exe&quot; 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 &quot;C:\Path\To\python.exe&quot; 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 (D:\Projects\Quadque-Tech-Server\node_modules\node-gyp\lib\find-python.js:302:47) gyp ERR! stack at PythonFinder.runChecks (D:\Projects\Quadque-Tech-Server\node_modules\node-gyp\lib\find-python.js:136:21) gyp ERR! stack at PythonFinder.<anonymous> (D:\Projects\Quadque-Tech-Server\node_modules\node-gyp\lib\find-python.js:200:18) gyp ERR! stack at PythonFinder.execFileCallback (D:\Projects\Quadque-Tech-Server\node_modules\node-gyp\lib\find-python.js:266:16) gyp ERR! stack at exithandler (node:child_process:420:5) gyp ERR! stack at ChildProcess.errorhandler (node:child_process:432:5) gyp ERR! stack at ChildProcess.emit (node:events:513:28) gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:289:12) gyp ERR! stack at onErrorNT (node:internal/child_process:476:16) gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21) gyp ERR! System Windows_NT 10.0.19044 gyp ERR! command &quot;C:\\Program Files\\nodejs\\node.exe&quot; &quot;D:\\Projects\\Quadque-Tech-Server\\node_modules\\node-gyp\\bin\\node-gyp.js&quot; &quot;rebuild&quot; &quot;--verbose&quot; &quot;--libsass_ext=&quot; &quot;--libsass_cflags=&quot; &quot;--libsass_ldflags=&quot; &quot;--libsass_library=&quot; gyp ERR! cwd D:\Projects\Quadque-Tech-Server\node_modules\node-sass gyp ERR! node -v v18.12.1 gyp ERR! node-gyp -v v7.1.2 gyp ERR! not ok Build failed with error code: 1 npm WARN acorn-import-assertions@1.8.0 requires a peer of acorn@^8 but none is installed. You must install peer dependencies yourself. npm WARN prosemirror-utils@0.9.6 requires a peer of prosemirror-tables@^0.9.1 but none is installed. You must install peer dependencies yourself. npm WARN css-loader@1.0.1 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself. npm WARN file-loader@2.0.0 requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {&quot;os&quot;:&quot;darwin&quot;,&quot;arch&quot;:&quot;any&quot;} (current: {&quot;os&quot;:&quot;win32&quot;,&quot;arch&quot;:&quot;x64&quot;}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@6.0.1 postinstall: `node scripts/build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@6.0.1 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Tanjib\AppData\Roaming\npm-cache\_logs\2023-01-08T15_14_38_129Z-debug.log</pre> <p><strong>注意:我使用纱线安装了一些东西,然后就发生了这种情况。我以前没有用过纱线。我想我搞砸了一些事情。</strong> 它总是显示 python 错误。为什么 ? 我卸载并重新安装了node.js。但错误就是不去。帮助。</p>
P粉566048790
P粉566048790

全員に返信(1)
P粉225961749

これは、Python 3.x がシステムにまだインストールされていないか、Python のインストール バイナリ フォルダーが PATH にないことを意味します。 Python のインストーラーは、インストール フォルダーを PATH 環境変数に追加できる必要があります。

Python がインストールされているにも関わらずこのエラーが発生する場合は、次の手順に従ってください:

  1. スタートメニューを右クリックし、システムに移動します
  2. [システムの詳細設定]をクリックします
  3. 環境変数をクリックします
  4. PATHを選択して「編集...」をクリックします
  5. 「新規」をクリックして、Python のインストール バイナリ フォルダーをリストに追加します。
いいねを押す +0
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート