简体   繁体   English

未找到模块:无法在 Next.js 应用程序中解析“@react-stately/collections”

[英]Module not found: Can't resolve '@react-stately/collections' in Next.js app

I was working on the Next.js app.我正在开发 Next.js 应用程序。 I installed the react-use package in my Next.js project!我在 Next.js 项目中安装了react-use包! Suddenly Next.js started throwing errors!突然 Next.js 开始抛出错误!

错误

Then, I searched for similar errors on Stackoverflow.然后,我在 Stackoverflow 上搜索了类似的错误。 Some of them suggested removing node_modules and package-lock.json and trying to reinstall npm packages.他们中的一些人建议删除node_modulespackage-lock.json并尝试重新安装 npm 包。 I did so, but nothing seems working!我这样做了,但似乎没有任何效果! Then restarted VSCode and computer, but the error was still there!然后重新启动了VSCode和电脑,但错误仍然存​​在!

Even I tried to install that package, which is shown in error, but again it throwing an error for another package.即使我尝试安装该软件包,该软件包也显示错误,但它再次为另一个软件包抛出错误。

I am not sure why suddenly started throwing errors!我不知道为什么突然开始抛出错误!

This is my package.json这是我的package.json

包.json

I tried to update NextUI's latest version which is "@nextui-org/react": "^1.0.0-beta.9"我尝试更新 NextUI 的最新版本,即"@nextui-org/react": "^1.0.0-beta.9"

My current package.json file, after updating the NextUI我当前的package.json文件,更新 NextUI 后

新包.json

Try to clean the cache and delete node_modules then install it again尝试清理缓存并删除node_modules然后重新安装

npm cache verify

npm cache clean --force

Delete node_modules删除node_modules

npm install

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 找不到模块:无法解析 Next.js 应用程序中的“fs” - Module not found: Can't resolve 'fs' in Next.js application 对于 next.js,为什么我突然开始看到找不到模块:错误:无法解析“fs”? - With next.js, why did I suddenly start seeing Module not found: Error: Can't resolve 'fs'? 我正在尝试将 NPM package 作为插件注入到 Next.js 应用程序上,以避免出现“找不到模块:无法解析‘child_process’”错误 - I'm Trying to Inject An NPM package As A Plugin on A Next.js App to Avoid A "Module not found: Can't resolve 'child_process'" Error Next.js - 使用 BigQuery 客户端库时出现错误:找不到模块:无法解析“child_process” - Next.js - using BigQuery client library gives an error : Module not found: Can't resolve 'child_process' 找不到模块:无法在 next.js 12.1.5 中使用节点 16 的反应 18 解析“再生器运行时” - Module not found: Can't resolve 'regenerator-runtime' in next js 12.1.5 with react 18 with node 16 找不到模块:错误:无法解析“D:\GitHub\project”中的“./C:/Users/user/AppData/Roaming/npm/node_modules/next/dist/client/next.js” - Module not found: Error: Can't resolve './C:/Users/user/AppData/Roaming/npm/node_modules/next/dist/client/next.js' in 'D:\GitHub\project' 找不到模块:无法解析“@reactchartjs/react-chart-2.js” - Module not found: Can't resolve '@reactchartjs/react-chart-2.js' 在Next.js中使用节点'url'模块反应SSR应用 - Using the node 'url' module in Next.js react SSR app 找不到模块:错误:无法解析 React-js? - Module not found: Error: Can't resolve React-js? 找不到模块:错误:无法解析“fs”反应 js - Module not found: Error: Can't resolve 'fs' react js
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM