Skip to content

需要更改lib为dist #785

@crosage

Description

@crosage

hexo版本7.3.0下
js_lsload.js
js_hex.js
css_lsload.js

出现错误

Unhandled rejection Error: D:\myblog\themes\material\layout\layout.ejs:3
    1| <!DOCTYPE html>
    2| <html style="display: none;" <% if(config.language !== null) { %>lang="<%- config.language.substring(0,2) %>"<% } %>>
 >> 3|     <%- partial('_partial/head') %>
    4|
    5|     <% if(page.layout === 'gallery') { %>
    6|         <!-- Single Gallery Page -->

D:\myblog\themes\material\layout\_partial\head.ejs:129
    127|         <%- jsLsload({path:(theme.vendors.materialcdn + '/js/jquery.min.js'),key:'jq_js'}) %>
    128|     <% } else { %>
 >> 129|         <%- jsLsload({path:('js/jquery.min.js'),key:'jq_js'}) %>
    130|     <% } %>
    131|
    132|     <!-- WebAPP Icons -->

Cannot find module '../../../../node_modules/hexo/lib/plugins/helper/url_for'
Require stack:
- D:\myblog\themes\material\scripts\lib\js_lsload.js
- D:\myblog\themes\material\scripts\helper.js
    at Function._resolveFilename (node:internal/modules/cjs/loader:1405:15)
    at defaultResolveImpl (node:internal/modules/cjs/loader:1061:19)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1066:22)
    at Function._load (node:internal/modules/cjs/loader:1215:37)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
    at Module.require (node:internal/modules/cjs/loader:1491:12)
    at require (node:internal/modules/helpers:135:16)
    at Hexo.jsHelper (D:\myblog\themes\material\scripts\lib\js_lsload.js:30:9)
    at Object.<anonymous> (D:\myblog\themes\material\scripts\helper.js:6:40)
    at eval ("D:\\myblog\\themes\\material\\layout\\_partial\\head.ejs":185:17)
    at head (D:\myblog\node_modules\ejs\lib\ejs.js:703:17)
    at _View._compiledSync (D:\myblog\node_modules\hexo\dist\theme\view.js:117:32)
    at _View.renderSync (D:\myblog\node_modules\hexo\dist\theme\view.js:55:29)
    at Object.partial (D:\myblog\node_modules\hexo\dist\plugins\helper\partial.js:27:17)
    at eval ("D:\\myblog\\themes\\material\\layout\\layout.ejs":19:17)
    at layout (D:\myblog\node_modules\ejs\lib\ejs.js:703:17)
    at _View._compiled (D:\myblog\node_modules\hexo\dist\theme\view.js:120:67)
    at _View.render (D:\myblog\node_modules\hexo\dist\theme\view.js:37:21)
    at D:\myblog\node_modules\hexo\dist\theme\view.js:48:31
    at tryCatcher (D:\myblog\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (D:\myblog\node_modules\bluebird\js\release\promise.js:547:31)
    at Promise._settlePromise (D:\myblog\node_modules\bluebird\js\release\promise.js:604:18)
    at Promise._settlePromise0 (D:\myblog\node_modules\bluebird\js\release\promise.js:649:10)
    at Promise._settlePromises (D:\myblog\node_modules\bluebird\js\release\promise.js:729:18)
    at _drainQueueStep (D:\myblog\node_modules\bluebird\js\release\async.js:93:12)
    at _drainQueue (D:\myblog\node_modules\bluebird\js\release\async.js:86:9)
    at Async._drainQueues (D:\myblog\node_modules\bluebird\js\release\async.js:102:5)
    at Async.drainQueues [as _onImmediate] (D:\myblog\node_modules\bluebird\js\release\async.js:15:14)
    at process.processImmediate (node:internal/timers:511:21)

更改代码内容
js_lsload.js
js_hex.js
css_lsload.js
../../../../node_modules/hexo/lib/plugins/helper/url_for为·../../../../node_modules/hexo/dist/plugins/helper/url_for后正常运行

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions