hexojs / hexo

A fast, simple & powerful blog framework, powered by Node.js.
https://hexo.io
MIT License
38.83k stars 4.75k forks source link

启动本地4000端口缺少模块? #5027

Closed TNT1130-DX closed 1 year ago

TNT1130-DX commented 1 year ago

启动本地4000端口缺少模块

ERROR Cannot find module './data/packed/latest.json' Require stack: ERROR Local hexo loading failed in E:\hexo\blog ERROR Try running: 'rm -rf node_modules && npm install --force'

TNT1130-DX commented 1 year ago

小白求助大佬

renbaoshuo commented 1 year ago

请问能否提供一些更详细的日志呢?

TNT1130-DX commented 1 year ago

可以提供一些更详细的日志吗? **ERROR Cannot find module './data/packed/latest.json' Require stack:

  • E:\hexo\blog\node_modules\moment-timezone\index.js
  • E:\hexo\blog\node_modules\hexo\lib\plugins\helper\date.js
  • E:\hexo\blog\node_modules\hexo\lib\models\types\moment.js
  • E:\hexo\blog\node_modules\hexo\lib\models\page.js
  • E:\hexo\blog\node_modules\hexo\lib\models\index.js
  • E:\hexo\blog\node_modules\hexo\lib\hexo\register_models.js
  • E:\hexo\blog\node_modules\hexo\lib\hexo\index.js
  • C:\Users\tnt\AppData\Roaming\npm\node_modules\hexo\node_modules_hexo-cli@4.3.0@hexo-cli\lib\hexo.js
  • C:\Users\tnt\AppData\Roaming\npm\node_modules\hexo\bin\hexo ERROR Local hexo loading failed in E:\hexo\blog ERROR Try running: 'rm -rf node_modules && npm install --force'**

麻烦大佬看一下

renbaoshuo commented 1 year ago

有没有试过重新安装依赖呢?

先执行 rmdir /S .\node_modules 命令删除依赖,再使用 npm install 命令重新安装依赖。

TNT1130-DX commented 1 year ago

有没有试过重新安装依赖呢?

先执行 rmdir /S .\node_modules 命令删除依赖,再使用 npm install 命令重新安装依赖。

谢谢大佬,我之前就一直重复安装依赖,我以为会覆盖的。现在可以了谢谢大佬指点