我想用 npm 安装 THREE.JS。发现15个高危漏洞

i want to install THREE.JS with npm. found 15 high severity vulnerabilities

我在官方文档上做教程

I see, that I need to write this: npm install three --save-dev


我做了,我有很多错误


PS C:\Users\laaou\Desktop\three> npm install three --save-dev
npm WARN saveError ENOENT: no such file or directory, 
open 'C:\Users\laaou\package.json'
npm WARN enoent ENOENT: no such file or directory, open     'C:\Users\laaou\package.json'
npm WARN tailwindcss@2.2.7 requires a peer of autoprefixer@^10.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN laaou No description
npm WARN laaou No repository field.
npm WARN laaou No README data      
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ three@0.132.2

18 packages are looking for funding
  run `npm fund` for details

found 15 high severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
PS C:\Users\laaou\Desktop\three> npm audit fix
npm ERR! code EAUDITNOPJSON
npm ERR! audit No package.json found: Cannot audit a project without a package.json

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\laaou\AppData\Roaming\npm-cache\_logs21-08-31T17_59_47_376Z-debug.log      

有趣的部分:

编辑:我认为是 vscode 扩展代码和源代码,因为这是不可能的,事实是 5k 仅适用于 three.js.


我不知道我怎么会出现这个错误(我是初学者)。


thank if you help me, i will put ✅ if is useful.


您的项目似乎没有正确设置。它适用于 git,但不适用于 npm

错误信息:

npm ERR! audit No package.json found: Cannot audit a project without a package.json

说明您必须有一个 package.json 文件。

npm init -y

将获得基本的 npm 结构


第二件事是您在 vscode 源代码管理中看到 git 变化,但在资源管理器中看不到文件。这可能是因为您的资源管理器正在过滤这些目录:node_modules.git

设置 > 搜索“files.exclude”> 查看列表

通常。git 默认隐藏