无法找到模块请验证package.json具有有效的“main”条目nuxtjs error on npm run dev
无法找到模块“/root/html/favicon. ico”。请验证package.json是否具有有效的“main”条目
at tryPackage (node:internal/modules/cjs/loader:353:19)
at Function.Module._findPath (node:internal/modules/cjs/loader:566:18)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.resolve (node:internal/modules/cjs/helpers:108:19)
at p (node_modules/jiti/dist/jiti.js:1:52925)
at g (node_modules/jiti/dist/jiti.js:1:54200)
at node_modules/external-editor/main/index.js:12:20
at g (node_modules/jiti/dist/jiti.js:1:55111)
at node_modules/inquirer/lib/prompts/editor.js:7:17
at g (node_modules/jiti/dist/jiti.js:1:55111)
2条答案
按热度按时间ffx8fchx1#
我得到了一个类似的错误,并通过删除node_modules和package-lock.json文件来修复它,然后运行“npm install”来安装依赖项。
alen0pnh2#
以下步骤应该有所帮助
1.删除
package-lock.json
和node_modules
1.运行
npm install