ERROR Script load failed: themes/obsidian/scripts/libs/cheerio/static.js
Error: Cannot find module 'css-what'
Require stack:
- /www/wwwroot/myblog/node_modules/css-select/lib/compile.js
- /www/wwwroot/myblog/node_modules/css-select/index.js
- /www/wwwroot/myblog/themes/obsidian/scripts/libs/cheerio/static.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/www/wwwroot/myblog/node_modules/css-select/lib/compile.js:9:19)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/www/wwwroot/myblog/node_modules/css-select/index.js:12:21)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (/www/wwwroot/myblog/node_modules/hexo/lib/hexo/index.js:280:23)
at /www/wwwroot/myblog/themes/obsidian/scripts/libs/cheerio/static.js:6:14
at /www/wwwroot/myblog/node_modules/hexo/lib/hexo/index.js:293:14
at tryCatcher (/www/wwwroot/myblog/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/www/wwwroot/myblog/node_modules/bluebird/js/release/promise.js:547:31)
访问首页发现是空白的情况,可以查看仓库根目录下,应该会有一个
index.html
文件打开这个文件不出意外是空白的,静态文件生成了,但是没有内容。
会看到类似的报错信息
简而言之,就是模块缺失,作者给出了
package.json
所以解决办法:
40 这里也提到了此问题,手动安装一次就好了