prefix = "C:\\Users\\75798\\AppData\\Roaming\\npm" ; overridden by user 如何解决

时间: 2023-11-09 15:05:25 浏览: 272
PDF

npm修改全局安装默认路径(C:\Users\Administrator\AppData\Roaming\npm\node_modules)

star5星 · 资源好评率100%
这个问题是因为你在运行npm命令时,使用了管理员权限,但是你的计算机禁止运行脚本。你可以通过以下步骤解决这个问题: 1.打开PowerShell,以管理员身份运行。 2.输入以下命令:Set-ExecutionPolicy RemoteSigned 3.按Y键确认更改。 4.重新运行你的npm命令,应该就可以正常运行了。
阅读全文

相关推荐

npm ERR! code 1 npm ERR! path C:\Users\Administrator\AppData\Roaming\npm\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 python-2.7.15.msi npm ERR! [============================================>] 100.0% of 19.3 MB (5.52 MB/s) npm ERR! Downloaded python-2.7.15.msi. Saved to C:\Users\Administrator\.windows-build-tools\python-2.7.15.msi. Downloading vs_BuildTools.exe npm ERR! [============================================>] 100.0% (0 B/s) npm ERR! Downloaded vs_BuildTools.exe. Saved to C:\Users\Administrator\.windows-build-tools\vs_BuildTools.exe. npm ERR! npm ERR! Starting installation... npm ERR! Downloading installers failed. Error: TypeError: 'process.env' only accepts a configurable, writable, and enumerable data descriptor npm ERR! at Function.defineProperty (<anonymous>) npm ERR! at Object.removePath (C:\Users\Administrator\AppData\Roaming\npm\node_modules\windows-build-tools\dist\utils\remove-path.js:11:12) npm ERR! at Object.install (C:\Users\Administrator\AppData\Roaming\npm\node_modules\windows-build-tools\dist\install\index.js:29:19) npm ERR! at C:\Users\Administrator\AppData\Roaming\npm\node_modules\windows-build-tools\dist\start.js:17:19 npm ERR! at Object.download (C:\Users\Administrator\AppData\Roaming\npm\node_modules\windows-build-tools\dist\download.js:35:5) npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:95:5) npm ERR! at async Object.aquireInstallers (C:\Users\Administrator\AppData\Roaming\npm\node_modules\windows-build-tools\dist\aquire-installers.js:32:13) { npm ERR! code: 'ERR_INVALID_OBJECT_DEFINE_PROPERTY' npm ERR! } npm ERR! windows-build-tools will now exit.