错误:找不到模块' d:\ next \ dist \ bin \ next'在下一个项目上运行NPM运行DEV时
尝试在新电脑上设置我的开发环境,并且在运行npm运行dev
中时,我会遇到此错误noreferrer”>
我已经尝试删除节点模块和软件包锁。JSON和运行npm install
。它不起作用。
节点版本是v18.4.0吗
?
Trying to setup my dev environment on a new PC and I get this error when running npm run dev
Been trying to search for an answer for an hour now but can't find a solution.
I've tried deleting node-modules and package-lock.json and running npm install
again. It didn't work.
Node version is v18.4.0
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
好的,我发现了。
问题是文件夹名称“ Will& Skill”。将其更改为“ Willandskill”使其正常工作。
Ok, I figured it out.
The problem was the folder name "Will & Skill". Changing it to "WillAndSkill" makes it work.
如果您的代码基本文件夹路径中的任何地方都有任何特殊字符,则它正在创建问题。我只是更改了系统中代码库的位置,然后开始工作。
If any special character is there anywhere in the path of your code base folder then it is creating the issue. I simply changed the location of my code base in my system and it started working.
哇,具有特殊字符的文件路径的问题是真实的。.,我喜欢Misc!@#$作为文件夹名称,节点模块无法导航依赖项本身...只是更改为其他一些文件夹,然后运行“ NPM运行”开发人员“它确实花了3天的时间来发现这就是问题!!现在,我的任务迟到了。至少解决了问题……为此感到高兴。
接下来重建的解决过程可能会起作用,并重新安装node_modules和package.json.lock会起作用……它的另一种方法可以正常工作。
一如既往地感谢社区!!
Wow the issue with the file path having special characters is real.., I had like misc!@#$ as the folder name and the node modules cant navigate the dependencies itself... just changed to some other folder then ran "npm run dev" and it worked really spent 3 days on this to find out this is the issue !! Now I am super late to my assignment ????. Atleast the issue got solved... happy for it.
The solving process of rebuilding next could work and reinstalling node_modules and package.json.lock would work... Its just that the other way worked.
Thanks for the community as always !!
i删除node_modeules文件夹并再次运行。它是有效的
İ remove node_modeules folder and run again. It is worked