Giter Site home page Giter Site logo

安装不了 about hexo-helper-live2d HOT 12 CLOSED

eyhn avatar eyhn commented on July 24, 2024
安装不了

from hexo-helper-live2d.

Comments (12)

EYHN avatar EYHN commented on July 24, 2024 1

@Ailen1988 @bigtnt @CodeWicky 对不起之前搞错了。 特意下载了next主题试了一下,确实不行。swig注入代码应该为

{{ live2d() }}

如图:
image

from hexo-helper-live2d.

bellchet58 avatar bellchet58 commented on July 24, 2024

用--save替换-save试试

from hexo-helper-live2d.

EYHN avatar EYHN commented on July 24, 2024

我无法复现

我可以给出以下解决方案:

  • 在良好的网络环境下重试(国内可能需要代理)
  • 使用 cnpm
  • 把 npm registry 设置为默认
  • 运行 npm install npm@latest -g 更新 npm 版本
  • 重新安装 npm 和 node。截止目前最新版本为 npm 5.0.2 node 8.1.0.

from hexo-helper-live2d.

CodeWicky avatar CodeWicky commented on July 24, 2024

可能是公司网络做了限制,回家试了一下可以了,感谢回复

from hexo-helper-live2d.

CodeWicky avatar CodeWicky commented on July 24, 2024

不好意思,总问。。。
这次我安装成功了。
因为是刚开始弄博客,所以有些地方不太懂,您见谅哈。
因为不知道是在站点配置文件还是主题配置文件添加

live2d:
  model: koharu
  bottom: -360

所以我就都添加了。
然而并没有显示。
我使用的是NexT主体,我以为是底下的滚动条进度挡上就调到-360也显示不了。

但是

hexo g

的时候有明确的看到live2d的文件有集成进去。。。

不知道怎么弄呢。。。

from hexo-helper-live2d.

EYHN avatar EYHN commented on July 24, 2024

因为 Next 主题使用了 swig 模板, 注入主题的代码应该改为

{% live2d() %}

from hexo-helper-live2d.

 avatar commented on July 24, 2024

请问Next主题应该把代码粘贴在哪个文件的什么位置啊?新手什么都不懂(ノへ ̄、)

from hexo-helper-live2d.

EYHN avatar EYHN commented on July 24, 2024

@bigtnt 应该是这个文件 https://github.com/iissnan/hexo-theme-next/blob/master/layout/_layout.swig </body> 之前

from hexo-helper-live2d.

Allen-LPL avatar Allen-LPL commented on July 24, 2024

@EYHN

@bigtnt 应该是这个文件 https://github.com/iissnan/hexo-theme-
next/blob/master/layout/_layout.swig 之前

按照这个方式写入

{% live2d() %}

报出了这个错误.
我的主题也是next

ERROR Process failed: layout/page.swig
Error: Unexpected tag "live2d()" on line 85 in file E:\blog\themes\next\layout_layout.swig.
at Object.exports.throwError (E:\blog\node_modules\swig\lib\utils.js:183:9)
at parseTag (E:\blog\node_modules\swig\lib\parser.js:544:13)
at E:\blog\node_modules\swig\lib\parser.js:640:15
at Object.exports.each (E:\blog\node_modules\swig\lib\utils.js:45:11)
at Object.exports.parse (E:\blog\node_modules\swig\lib\parser.js:624:9)
at parse (E:\blog\node_modules\swig\lib\swig.js:354:19)
at parseFile (E:\blog\node_modules\swig\lib\swig.js:380:17)
at getParents (E:\blog\node_modules\swig\lib\swig.js:443:54)
at Object.precompile (E:\blog\node_modules\swig\lib\swig.js:487:17)
at Object.compile (E:\blog\node_modules\swig\lib\swig.js:606:16)
at Function.swigRenderer.compile (E:\blog\node_modules\hexo\lib\plugins\renderer\swig.js:42:15)
at View._precompile (E:\blog\node_modules\hexo\lib\theme\view.js:119:29)
at View (E:\blog\node_modules\hexo\lib\theme\view.js:13:8)
at new Theme._View.View (E:\blog\node_modules\hexo\lib\theme\index.js:37:10)
at Theme.setView (E:\blog\node_modules\hexo\lib\theme\index.js:71:20)
at E:\blog\node_modules\hexo\lib\theme\processors\view.js:14:14
at tryCatcher (E:\blog\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (E:\blog\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (E:\blog\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (E:\blog\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (E:\blog\node_modules\bluebird\js\release\promise.js:693:18)
at Promise._fulfill (E:\blog\node_modules\bluebird\js\release\promise.js:638:18)

from hexo-helper-live2d.

Allen-LPL avatar Allen-LPL commented on July 24, 2024

@EYHN @bigtnt @CodeWicky
有了!

谢谢 @EYHN 的帮助

from hexo-helper-live2d.

ma-qing avatar ma-qing commented on July 24, 2024

npm WARN [email protected] requires a peer of eslint@>= 4.12.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

from hexo-helper-live2d.

xiazeyu avatar xiazeyu commented on July 24, 2024

npm WARN [email protected] requires a peer of eslint@>= 4.12.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

WARN不用管,不影响使用

from hexo-helper-live2d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.