npm 1.0: Global vs Local installation

npm 1.0简化了包安装目录结构,提供了全局和本地两种安装方式。全局安装将模块放置在系统路径下,并将可执行文件放入PATH环境变量中;本地安装则将依赖项安装在项目根目录下的node_modules文件夹内。

from: http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/

npm 1.0: Global vs Local installation

npm 1.0 is in release candidate mode. Go get it!

More than anything else, the driving force behind the npm 1.0 rearchitecture was the desire to simplify what a package installation directory structure looks like.

In npm 0.x, there was a command called bundle that a lot of people liked. bundlelet you install your dependencies locally in your project, but even still, it was basically a hack that never really worked very reliably.

Also, there was that activation/deactivation thing. That’s confusing.

Two paths

In npm 1.0, there are two ways to install things:

  1. globally —- This drops modules in {prefix}/lib/node_modules, and puts executable files in {prefix}/bin, where {prefix} is usually something like /usr/local. It also installs man pages in {prefix}/share/man, if they’re supplied.
  2. locally —- This installs your package in the current working directory. Node modules go in ./node_modules, executables go in./node_modules/.bin/, and man pages aren’t installed at all.

Which to choose

Whether to install a package globally or locally depends on the global config, which is aliased to the -g command line switch.

Just like how global variables are kind of gross, but also necessary in some cases, global packages are important, but best avoided if not needed.

In general, the rule of thumb is:

  1. If you’re installing something that you want to use in your program, using require('whatever'), then install it locally, at the root of your project.
  2. If you’re installing something that you want to use in your shell, on the command line or something, install it globally, so that its binaries end up in your PATH environment variable.

When you can’t choose

Of course, there are some cases where you want to do both. Coffee-script andExpress both are good examples of apps that have a command line interface, as well as a library. In those cases, you can do one of the following:

  1. Install it in both places. Seriously, are you that short on disk space? It’s fine, really. They’re tiny JavaScript programs.
  2. Install it globally, and then npm link coffee-script or npm link express(if you’re on a platform that supports symbolic links.) Then you only need to update the global copy to update all the symlinks as well.

The first option is the best in my opinion. Simple, clear, explicit. The second is really handy if you are going to re-use the same library in a bunch of different projects. (More on npm link in a future installment.)

You can probably think of other ways to do it by messing with environment variables. But I don’t recommend those ways. Go with the grain.

Slight exception: It’s not always the cwd.

Let’s say you do something like this:

cd ~/projects/foo     # go into my project
npm install express   # ./node_modules/express
cd lib/utils          # move around in there
vim some-thing.js     # edit some stuff, work work work
npm install redis     # ./lib/utils/node_modules/redis!? ew.

In this case, npm will install redis into ~/projects/foo/node_modules/redis. Sort of like how git will work anywhere within a git repository, npm will work anywhere within a package, defined by having a node_modules folder.

Test runners and stuff

If your package’s scripts.test command uses a command-line program installed by one of your dependencies, not to worry. npm makes ./node_modules/.bin the first entry in the PATH environment variable when running any lifecycle scripts, so this will work fine, even if your program is not globally installed:

{ "name" : "my-program"
, "version" : "1.2.3"
, "dependencies": { "express": "*", "coffee-script": "*" }
, "devDependencies": { "vows": "*" }
, "scripts":
  { "test": "vows test/*.js"
  , "preinstall": "cake build" } }


PS E:\tool\robot-project> node -v v16.20.2 PS E:\tool\robot-project> npm install --global windows-build-tools npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated windows-build-tools@5.2.2: Node.js now includes build tools for Windows. You probably no longer need this tool. See https://github.com/felixrieseberg/windows-build-tools for details. npm ERR! code 1 npm ERR! path D:\node_global\node_modules\windows-build-tools npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node ./dist/index.js Downloading vs_BuildTools.exe npm ERR! [============================================>] 100.0% (0 B/s) npm ERR! Downloaded vs_BuildTools.exe. Saved to C:\Users\lijian\.windows-build-tools\vs_BuildTools.exe. npm ERR! npm ERR! Starting installation... npm ERR! Please restart this script from an administrative PowerShell! npm ERR! The build tools cannot be installed without administrative rights. npm ERR! To fix, right-click on PowerShell and run "as Administrator". npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\lijian\AppData\Local\npm-cache\_logs\2025-03-16T05_10_20_311Z-debug-0.log PS E:\tool\robot-project>
03-17
C:\Users\Admin\AppData\Local\nvm\v20.17.0\node_modules\windows-build-tools npm error command failed npm error command C:\Windows\system32\cmd.exe /d /s /c node ./dist/index.js npm error Downloading vs_BuildTools.exe npm error [> ] 0.0% (0 B/s) npm error ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading vs_BuildTools.exe npm error [============================================>] 100.0% (0 B/s) npm error ^[[1000D^[[0K^[[1A^[[1000D^[[0K^[[1A^[[1000D^[[0KDownloading vs_BuildTools.exe npm error [============================================>] 100.0% (0 B/s) npm error Downloaded vs_BuildTools.exe. Saved to C:\Users\Admin\.windows-build-tools\vs_BuildTools.exe. npm error npm error Starting installation... npm error Downloading installers failed. Error: TypeError: 'process.env' only accepts a configurable, writable, and enumerable data descriptor npm error at Function.defineProperty (<anonymous>) npm error at Object.removePath (C:\Users\Admin\AppData\Local\nvm\v20.17.0\node_modules\windows-build-tools\dist\utils\remove-path.js:11:12) npm error at Object.install (C:\Users\Admin\AppData\Local\nvm\v20.17.0\node_modules\windows-build-tools\dist\install\index.js:29:19) npm error at C:\Users\Admin\AppData\Local\nvm\v20.17.0\node_modules\windows-build-tools\dist\start.js:17:19 npm error at Object.download (C:\Users\Admin\AppData\Local\nvm\v20.17.0\node_modules\windows-build-tools\dist\download.js:35:5) npm error at process.processTicksAndRejections (node:internal/process/task_queues:95:5) npm error at async Object.aquireInstallers (C:\Users\Admin\AppData\Local\nvm\v20.17.0\node_modules\windows-build-tools\dist\aquire-installers.js:32:13) { npm error code: 'ERR_INVALID_OBJECT_DEFINE_PROPERTY' npm error } npm error windows-build-tools will now exit. npm error A complete log of this run can be found in: C:\Users\Admin\AppData\Local\npm-cache\_logs\2025-06-18T02_46_43_271Z-debug-0.log这是什么问题
06-19
PS D:\All-Project\pointlion-ui\pointlion-ui> npm i npm warn ERESOLVE overriding peer dependency npm warn EBADENGINE Unsupported engine { npm warn EBADENGINE package: '@achrinza/node-ipc@9.2.2', npm warn EBADENGINE required: { node: '8 || 10 || 12 || 14 || 16 || 17' }, npm warn EBADENGINE current: { node: 'v18.20.8', npm: '10.8.2' } npm warn EBADENGINE } npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm warn deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs npm warn deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead. npm warn deprecated lodash.isequal@4.5.0: This package is deprecated. Use require('node:util').isDeepStrictEqual instead. npm warn deprecated move-concurrently@1.0.1: This package is no longer supported. npm warn deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility npm warn deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm warn deprecated figgy-pudding@3.5.2: This module is no longer supported. npm warn deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 npm warn deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained npm warn deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm warn deprecated eslint-loader@2.2.1: This loader has been deprecated. Please use eslint-webpack-plugin npm warn deprecated consolidate@0.15.1: Please upgrade to consolidate v1.0.0+ as it has been modernized with several long-awaited fixes implemented. Maintenance is supported by Forward Email at https://forwardemail.net ; follow/watch https://github.com/ladjs/consolidate for updates and release changelog npm warn deprecated copy-concurrently@1.0.5: This package is no longer supported. npm warn deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm warn deprecated har-validator@5.1.5: this library is no longer supported npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm warn deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead npm warn deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. npm warn deprecated npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) npm warn deprecated domexception@1.0.1: Use your platform's native DOMException instead npm warn deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm warn deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm warn deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin. npm warn deprecated left-pad@1.3.0: use String.prototype.padStart() npm warn deprecated microargs@1.1.2: This project has been renamed to @pawelgalazka/cli-args. Install using @pawelgalazka/cli-args instead npm warn deprecated html-webpack-plugin@3.2.0: 3.x is no longer supported npm warn deprecated html-webpack-plugin@3.2.0: 3.x is no longer supported npm warn deprecated fs-write-stream-atomic@1.0.10: This package is no longer supported. npm warn deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added npm warn deprecated microcli@1.3.3: This project has been renamed to @pawelgalazka/cli . Install using @pawelgalazka/cli instead npm warn deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address' npm warn deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates. npm warn deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm warn deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm warn deprecated runjs@4.4.2: This project has been renamed to 'tasksfile'. Install using 'npm install tasksfile' instead. npm warn deprecated webpack-chain@6.5.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm warn deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained npm warn deprecated @hapi/joi@15.1.1: Switch to 'npm install joi' npm warn deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x. npm warn deprecated vue@2.7.16: Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details. npm warn deprecated highlight.js@9.18.5: Support has ended for 9.x series. Upgrade to @latest npm warn deprecated eslint@7.15.0: This version is no longer supported. Please see https://eslint.org/version-support for other options. npm warn deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. npm warn deprecated core-js@3.19.1: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. npm warn cleanup Failed to remove some directories [ npm warn cleanup [ npm warn cleanup 'D:\\All-Project\\pointlion-ui\\pointlion-ui\\node_modules\\microcli', npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'D:\All-Project\pointlion-ui\pointlion-ui\node_modules\microcli\node_modules'] { npm warn cleanup errno: -4048, npm warn cleanup code: 'EPERM', npm warn cleanup syscall: 'rmdir', npm warn cleanup path: 'D:\\All-Project\\pointlion-ui\\pointlion-ui\\node_modules\\microcli\\node_modules' npm warn cleanup } npm warn cleanup ], npm warn cleanup [ npm warn cleanup 'D:\\All-Project\\pointlion-ui\\pointlion-ui\\node_modules', npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'D:\All-Project\pointlion-ui\pointlion-ui\node_modules\@vue'] { npm warn cleanup errno: -4048, npm warn cleanup code: 'EPERM', npm warn cleanup syscall: 'rmdir', npm warn cleanup path: 'D:\\All-Project\\pointlion-ui\\pointlion-ui\\node_modules\\@vue' npm warn cleanup } npm warn cleanup ], npm warn cleanup [ npm warn cleanup 'D:\\All-Project\\pointlion-ui\\pointlion-ui\\node_modules\\browser-resolve', npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'D:\All-Project\pointlion-ui\pointlion-ui\node_modules\browser-resolve\node_modules\resolve\test\resolver\punycode'] { npm warn cleanup errno: -4048, npm warn cleanup code: 'EPERM', npm warn cleanup syscall: 'rmdir', npm warn cleanup path: 'D:\\All-Project\\pointlion-ui\\pointlion-ui\\node_modules\\browser-resolve\\node_modules\\resolve\\test\\resolver\\punycode' npm warn cleanup } npm warn cleanup ] npm warn cleanup ] npm error code 1 npm error path D:\All-Project\pointlion-ui\pointlion-ui\node_modules\deasync npm error command failed npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node ./build.js npm error gyp info it worked if it ends with ok npm error gyp info using node-gyp@10.1.0 npm error gyp info using node@18.20.8 | win32 | ia32 npm error gyp ERR! find Python npm error gyp ERR! find Python checking Python explicitly set from command line or npm configuration npm error gyp ERR! find Python - "--python=" or "npm config get python" is "C:\Path\To\python.exe" npm error gyp ERR! find Python - executable path is "" npm error gyp ERR! find Python - "" could not be run npm error gyp ERR! find Python Python is not set from environment variable PYTHON npm error gyp ERR! find Python checking if the py launcher can be used to find Python 3 npm error gyp ERR! find Python - executable path is "" npm error gyp ERR! find Python - "" could not be run npm error gyp ERR! find Python checking if "python3" can be used npm error gyp ERR! find Python - executable path is "" npm error gyp ERR! find Python - "" could not be run npm error gyp ERR! find Python checking if "python" can be used npm error gyp ERR! find Python - executable path is "" npm error gyp ERR! find Python - "" could not be run npm error gyp ERR! find Python checking if Python is C:\Users\16976\AppData\Local\Programs\Python\Python311\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Users\16976\AppData\Local\Programs\Python\Python311\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Program Files\Python311\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Program Files\Python311\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Users\16976\AppData\Local\Programs\Python\Python311-32\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Users\16976\AppData\Local\Programs\Python\Python311-32\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Program Files\Python311-32\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Program Files\Python311-32\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python311-32\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Program Files (x86)\Python311-32\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Users\16976\AppData\Local\Programs\Python\Python310\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Users\16976\AppData\Local\Programs\Python\Python310\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Program Files\Python310\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Program Files\Python310\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Users\16976\AppData\Local\Programs\Python\Python310-32\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Users\16976\AppData\Local\Programs\Python\Python310-32\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Program Files\Python310-32\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Program Files\Python310-32\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python310-32\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Program Files (x86)\Python310-32\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Users\16976\AppData\Local\Programs\Python\Python39\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Users\16976\AppData\Local\Programs\Python\Python39\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Program Files\Python39\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Users\16976\AppData\Local\Programs\Python\Python39-32\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Users\16976\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Program Files\Python39-32\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Program Files\Python39-32\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Users\16976\AppData\Local\Programs\Python\Python38\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Users\16976\AppData\Local\Programs\Python\Python38\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Program Files\Python38\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Program Files\Python38\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Users\16976\AppData\Local\Programs\Python\Python38-32\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Users\16976\AppData\Local\Programs\Python\Python38-32\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Program Files\Python38-32\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Program Files\Python38-32\python.exe" could not be run npm error gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exe npm error gyp ERR! find Python - version is "" npm error gyp ERR! find Python - version is - should be >=3.6.0 npm error gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED npm error gyp ERR! find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be run npm error gyp ERR! find Python npm error gyp ERR! find Python ********************************************************** npm error gyp ERR! find Python You need to install the latest version of Python. npm error gyp ERR! find Python Node-gyp should be able to find and use Python. If not, npm error gyp ERR! find Python you can try one of the following options: npm error gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe" npm error gyp ERR! find Python (accepted by both node-gyp and npm) npm error gyp ERR! find Python - Set the environment variable PYTHON npm error gyp ERR! find Python - Set the npm configuration variable python: npm error gyp ERR! find Python npm config set python "C:\Path\To\python.exe" npm error gyp ERR! find Python For more information consult the documentation at: npm error gyp ERR! find Python https://github.com/nodejs/node-gyp#installation npm error gyp ERR! find Python ********************************************************** npm error gyp ERR! find Python npm error gyp ERR! configure error npm error gyp ERR! stack Error: Could not find any Python installation to use npm error gyp ERR! stack at PythonFinder.fail (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:306:11) npm error gyp ERR! stack at PythonFinder.findPython (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:164:17) npm error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5) npm error gyp ERR! stack at async configure (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:27:18)npm error gyp ERR! stack at async run (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js:81:18) npm error gyp ERR! System Windows_NT 10.0.22631 npm error gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" npm error gyp ERR! cwd D:\All-Project\pointlion-ui\pointlion-ui\node_modules\deasync npm error gyp ERR! node -v v18.20.8 npm error gyp ERR! node-gyp -v v10.1.0 npm error gyp ERR! not ok npm error Build failed npm error A complete log of this run can be found in: C:\Users\16976\AppData\Local\npm-cache\_logs\2025-10-27T06_31_09_631Z-debug-0.log PS D:\All-Project\pointlion-ui\pointlion-ui> npm run dev > jscm@3.8.3 dev > vue-cli-service serve 'vue-cli-service' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 PS D:\All-Project\pointlion-ui\pointlion-ui>
最新发布
10-28
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值