Giter Site home page Giter Site logo

在node 16.15.0, npm 8.5.5 下运行报错npm run dev :[vite] Internal server error: Module "@svgr/plugin-svgo" missing. Maybe `npm install @svgr/plugin-svgo` could help! about fe HOT 5 CLOSED

xuanzc avatar xuanzc commented on August 15, 2024
在node 16.15.0, npm 8.5.5 下运行报错npm run dev :[vite] Internal server error: Module "@svgr/plugin-svgo" missing. Maybe `npm install @svgr/plugin-svgo` could help!

from fe.

Comments (5)

jsers avatar jsers commented on August 15, 2024

npm ls @svgr/plugin-svgo
看下打印的结果

from fe.

xuanzc avatar xuanzc commented on August 15, 2024

npm ls @svgr/plugin-svgo
[email protected] /home/zechun/codes/fe
└── @svgr/[email protected]

from fe.

jsers avatar jsers commented on August 15, 2024

不太对,感觉是初次的 npm install 没有成功
这个 @svgr/plugin-svgo 是 [email protected] 包依赖的
看你这里 [email protected] 都没有安装进来
可以 git checkout package.json package-lock.json && rm -rf node_modules && npm i
重新安装下依赖,如果是网络问题可以用国内的镜像试下

from fe.

xuanzc avatar xuanzc commented on August 15, 2024

zechun@zechun-vm:~/codes/fe$ git checkout package.json package-lock.json && rm -rf node_modules && npm i
从索引区更新了 2 个路径
npm WARN deprecated [email protected]: 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 @codemirror/[email protected]: As of 0.20.0, this package has been merged into @codemirror/language
npm WARN deprecated [email protected]: This package has been replaced by @lezer/common
npm WARN deprecated [email protected]: This package has been replaced by @lezer/lr
npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.

added 1014 packages, and audited 1015 packages in 1m

191 packages are looking for funding
run npm fund for details

40 vulnerabilities (1 moderate, 38 high, 1 critical)

To address issues that do not require attention, run:
npm audit fix

To address all issues possible (including breaking changes), run:
npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run npm audit for details.

from fe.

jsers avatar jsers commented on August 15, 2024

安装完后可以检测下,如果打印以下应该就没问题
npm ls @svgr/plugin-svgo
└─┬ [email protected]
└── @svgr/[email protected]

from fe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.