Mrminfive / hexo-theme-skapp

The hexo flat design theme(扁平化简约主题)
MIT License
480 stars 118 forks source link

Cannot find module 'lunr' #69

Open chentong106140 opened 6 years ago

chentong106140 commented 6 years ago

亲问下:执行hexo g 报错,说没有这个"lunr"模块

ERROR Script load failed: themes\hexo-theme-skapp\scripts\renderer.js Error: Cannot find module 'lunr' at Function.Module._resolveFilename (module.js:489:15) at Function.Module._load (module.js:439:25) at Module.require (module.js:517:17) at require (D:\study\chentong106140.github.io\node_modules_hexo@3.7.1@hexo\lib\hexo\index.js:219:21) at D:\study\chentong106140.github.io\themes\hexo-theme-skapp\scripts\renderer.js:5:16 at fs.readFile.then.script (D:\study\chentong106140.github.io\node_modules_hexo@3.7.1@hexo\lib\hexo\index.js:232:12) at tryCatcher (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:512:31) at Promise._settlePromise (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:569:18) at Promise._settlePromise0 (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:614:10) at Promise._settlePromises (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:693:18) at Promise._fulfill (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:638:18) at Promise._resolveCallback (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:432:57) at Promise._settlePromiseFromHandler (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:524:17) at Promise._settlePromise (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:569:18) at Promise._settlePromise0 (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:614:10) at Promise._settlePromises (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:693:18) at Promise._fulfill (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:638:18) at D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\nodeback.js:42:21 at D:\study\chentong106140.github.io\node_modules_graceful-fs@4.1.11@graceful-fs\graceful-fs.js:78:16 at tryToString (fs.js:513:3) at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:501:12) INFO Start processing INFO Files loaded in 194 ms INFO Generated: archives/index.html INFO Generated: archives/2018/07/index.html INFO Generated: 2018/07/06/hello-world/index.html INFO Generated: index.html INFO Generated: archives/2018/index.html INFO Generated: js/md5.min.js INFO Generated: img/quotes.png INFO Generated: fonts/iconfont.woff INFO Generated: fonts/iconfont.ttf INFO Generated: fonts/iconfont.eot INFO Generated: fonts/iconfont.svg INFO Generated: js/common/animation.js INFO Generated: js/libs/axios.min.js INFO Generated: js/libs/lunr.min.js INFO Generated: js/common/pack.js INFO Generated: js/common/utils.js INFO Generated: js/layout/loading.js INFO Generated: scss/base/index.scss INFO Generated: js/page/post.js INFO Generated: js/layout/post.js INFO Generated: js/layout/back-top.js INFO Generated: js/page/search.js INFO Generated: js/layout/header.js INFO Generated: scss/views/page/about.scss INFO Generated: scss/views/page/index.scss INFO Generated: scss/views/page/post.scss INFO Generated: scss/views/page/error.scss INFO Generated: scss/views/page/archive.scss INFO Generated: scss/views/page/search.scss INFO Generated: scss/views/page/tag.scss INFO Generated: scss/views/page/category.scss INFO 31 files generated in 220 ms

D:\study\chentong106140.github.io>cnpm install √ Installed 10 packages √ Linked 0 latest versions √ Run 0 scripts √ All packages installed (used 22ms, speed 0B/s, json 0(0B), tarball 0B)

D:\study\chentong106140.github.io>heox clean 'heox' 不是内部或外部命令,也不是可运行的程序 或批处理文件。

D:\study\chentong106140.github.io>hexo clean ERROR Script load failed: themes\hexo-theme-skapp\scripts\renderer.js Error: Cannot find module 'lunr' at Function.Module._resolveFilename (module.js:489:15) at Function.Module._load (module.js:439:25) at Module.require (module.js:517:17) at require (D:\study\chentong106140.github.io\node_modules_hexo@3.7.1@hexo\lib\hexo\index.js:219:21) at D:\study\chentong106140.github.io\themes\hexo-theme-skapp\scripts\renderer.js:5:16 at fs.readFile.then.script (D:\study\chentong106140.github.io\node_modules_hexo@3.7.1@hexo\lib\hexo\index.js:232:12) at tryCatcher (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:512:31) at Promise._settlePromise (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:569:18) at Promise._settlePromise0 (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:614:10) at Promise._settlePromises (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:693:18) at Promise._fulfill (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:638:18) at Promise._resolveCallback (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:432:57) at Promise._settlePromiseFromHandler (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:524:17) at Promise._settlePromise (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:569:18) at Promise._settlePromise0 (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:614:10) at Promise._settlePromises (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:693:18) at Promise._fulfill (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:638:18) at D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\nodeback.js:42:21 at D:\study\chentong106140.github.io\node_modules_graceful-fs@4.1.11@graceful-fs\graceful-fs.js:78:16 at tryToString (fs.js:513:3) at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:501:12) INFO Deleted database. INFO Deleted public folder.

D:\study\chentong106140.github.io>hexo g ERROR Script load failed: themes\hexo-theme-skapp\scripts\renderer.js Error: Cannot find module 'lunr' at Function.Module._resolveFilename (module.js:489:15) at Function.Module._load (module.js:439:25) at Module.require (module.js:517:17) at require (D:\study\chentong106140.github.io\node_modules_hexo@3.7.1@hexo\lib\hexo\index.js:219:21) at D:\study\chentong106140.github.io\themes\hexo-theme-skapp\scripts\renderer.js:5:16 at fs.readFile.then.script (D:\study\chentong106140.github.io\node_modules_hexo@3.7.1@hexo\lib\hexo\index.js:232:12) at tryCatcher (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:512:31) at Promise._settlePromise (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:569:18) at Promise._settlePromise0 (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:614:10) at Promise._settlePromises (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:693:18) at Promise._fulfill (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:638:18) at Promise._resolveCallback (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:432:57) at Promise._settlePromiseFromHandler (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:524:17) at Promise._settlePromise (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:569:18) at Promise._settlePromise0 (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:614:10) at Promise._settlePromises (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:693:18) at Promise._fulfill (D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\promise.js:638:18) at D:\study\chentong106140.github.io\node_modules_bluebird@3.5.1@bluebird\js\release\nodeback.js:42:21 at D:\study\chentong106140.github.io\node_modules_graceful-fs@4.1.11@graceful-fs\graceful-fs.js:78:16 at tryToString (fs.js:513:3) at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:501:12) INFO Start processing

r-zh commented 5 years ago

npm install --save hexo-autoprefixer hexo-filter-cleanup hexo-generator-feed hexo-generator-sitemap hexo-renderer-sass hexo-renderer-swig mamboer/lunr.js moment node-sass object-assign

生成之前,需要执行这个命令,在这个项目首页有步骤,需要一步步来