代码之家  ›  专栏  ›  技术社区  ›  user1338054

节点Gyp不工作(windowsError:[错误183]墍–,)

  •  0
  • user1338054  · 技术社区  · 6 年前
    1. 我尝试卸载node/npm,安装LTS和最新版本。
    2. 我尝试了Windows生成工具
    3. 我手动安装了Visual Studio 2017和python 2.7

    安装本机插件节点gyp exit时没有任何帮助,错误如下:

    npm i
    
    v8-profiler@5.7.0 preinstall C:\VRNET\VRnet\viewers\web\node_modules\v8-profiler
    > node -e 'process.exit(0)'
    
    
    v8-profiler@5.7.0 install C:\VRNET\VRnet\viewers\web\node_modules\v8-profiler
    node-pre-gyp install --fallback-to-build
    
    node-pre-gyp ERR! Tried to download(404): https://node-inspector.s3.amazonaws.com/profiler/v5.7.0/node-v64-win32-x64.tar.gz
    node-pre-gyp ERR! Pre-built binaries not found for v8-profiler@5.7.0 and node@10.15.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
    node-pre-gyp ERR! Tried to download(undefined): https://node-inspector.s3.amazonaws.com/profiler/v5.7.0/node-v64-win32-x64.tar.gz
    node-pre-gyp ERR! Pre-built binaries not found for v8-profiler@5.7.0 and node@10.15.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
    Traceback (most recent call last):
      File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 16, in 
        sys.exit(gyp.script_main())
      File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 545, in script_main
        return main(sys.argv[1:])
      File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 538, in main
        return gyp_main(args)
      File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 523, in gyp_main
        generator.GenerateOutput(flat_list, targets, data, params)
      File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py", line 2025, in GenerateOutput
        version=msvs_version)
      File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSNew.py", line 213, in __init__
        self.Write()
      File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSNew.py", line 340, in Write
        f.close()
      File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\common.py", line 393, in close
        os.rename(self.tmp_path, filename)
    WindowsError: [Error 183] ═хтючьюцэю ёючфрЄ№ Їрщы,
    gyp ERR! configure error
    gyp ERR! stack Error: `gyp` failed with exit code: 1
    gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:345:16)
    gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
    gyp ERR! System Windows_NT 10.0.17134
    gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\VRNET\\VRnet\\viewers\\web\\node_modules\\v8-profiler\\build\\profiler\\v5.7.0\\node-v64-win32-x64\\profiler.node" "--module_name=profiler" "--module_path=C:\\VRNET\\VRnet\\viewers\\web\\node_modules\\v8-profiler\\build\\profiler\\v5.7.0\\node-v64-win32-x64" "--python=C:\\Program Files\\Python27\\python.exe"
    gyp ERR! cwd C:\VRNET\VRnet\viewers\web\node_modules\v8-profiler
    gyp ERR! node -v v10.15.0
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! not ok
    node-pre-gyp ERR! build error
    node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\VRNET\VRnet\viewers\web\node_modules\v8-profiler\build\profiler\v5.7.0\node-v64-win32-x64\profiler.node --module_name=profiler --module_path=C:\VRNET\VRnet\viewers\web\node_modules\v8-profiler\build\profiler\v5.7.0\node-v64-win32-x64 --python=C:\Program Files\Python27\python.exe' (1)
    node-pre-gyp ERR! stack     at ChildProcess. (C:\VRNET\VRnet\viewers\web\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
    node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
    node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:962:16)
    node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
    node-pre-gyp ERR! System Windows_NT 10.0.17134
    node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\VRNET\\VRnet\\viewers\\web\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
    node-pre-gyp ERR! cwd C:\VRNET\VRnet\viewers\web\node_modules\v8-profiler
    node-pre-gyp ERR! node -v v10.15.0
    node-pre-gyp ERR! node-pre-gyp -v v0.6.39
    node-pre-gyp ERR! not ok
    Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\VRNET\VRnet\viewers\web\node_modules\v8-profiler\build\profiler\v5.7.0\node-v64-win32-x64\profiler.node --module_name=profiler --module_path=C:\VRNET\VRnet\viewers\web\node_modules\v8-profiler\build\profiler\v5.7.0\node-v64-win32-x64 --python=C:\Program Files\Python27\python.exe' (1)
    npm WARN vrnet@ No repository field.
    npm WARN vrnet@ No license field.
    npm WARN The package gulp-uglify is included as both a dev and production dependency.
    npm WARN The package pump is included as both a dev and production dependency.
    npm WARN The package serve-static is included as both a dev and production dependency.
    npm WARN The package webdav-server is included as both a dev and production dependency.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: v8-profiler@5.7.0 (node_modules\v8-profiler):
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: v8-profiler@5.7.0 install: `node-pre-gyp install --fallback-to-build`
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
    
    audited 9137 packages in 17.225s
    found 167 vulnerabilities (148 low, 10 moderate, 9 high)
      run `npm audit fix` to fix them, or `npm audit` for details
    

    问题出在哪里?如何让吉普赛人工作?

    1 回复  |  直到 6 年前
        1
  •  0
  •   user1338054    6 年前

    由于某些原因,它不能正常工作,无论我如何处理安装的Visual Studio,我删除了它,用NPM安装构建工具,现在一切都正常。