我正在尝试在计算机中设置 firebase-tools,但尝试这样做时不断出现错误。当我尝试这样做时,我不断收到所有这些错误:
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: 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 [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\jaiza\\AppData\\Roaming\\npm\\node_modules\\firebase-tools\\node_modules\\exegesis',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\jaiza\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\exegesis\node_modules\ajv'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\jaiza\\AppData\\Roaming\\npm\\node_modules\\firebase-tools\\node_modules\\exegesis\\node_modules\\ajv'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code ENOENT
npm ERR! syscall spawn pwsh.exe
npm ERR! path C:\Users\jaiza\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\protobufjs
npm ERR! errno -4058
npm ERR! enoent spawn pwsh.exe ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in: C:\Users\jaiza\AppData\Local\npm-cache\_logs\2023-06-26T18_09_18_300Z-debug-0.log
我尝试卸载并重新安装我的node.js,因为我的npm似乎有问题,但没有任何效果。尽管我从 Node.js 网站安装了所有内容,但它一直显示
npm ERR! enoent This is related to npm not being able to find a file
。
可能相关的旁注,Windows 11 自动安装大约 3 个月,已经安装了 VS Code 和其他程序。
我正在尝试安装 firebase 来开发我自己的网站,但 firebase-tools 未正确下载
文件已损坏,在漫游目录中找不到 firebase-tools。 请按照以下步骤操作 1>从此位置删除node_modules文件夹C:\Users\jaiza\AppData\Roaming 下午
2> 从此位置复制 node_modules 文件夹 C:\Program Files odejs 到此位置 C:\Users\jaiza\AppData\Roaming 下午
3> 现在在 Node js 命令提示符中运行命令“npm install -g firebase-tools”。
您的文件将被生成。希望这能解决您的问题。