GithubHelp home page GithubHelp logo

Comments (10)

ppoffice avatar ppoffice commented on June 27, 2024

@SongshGeo 检查一下下面这个依赖有没有安装:

"hexo-renderer-sass": "^0.4.0",

from hexo-theme-minos.

SongshGeo avatar SongshGeo commented on June 27, 2024

@ppoffice

@SongshGeo 检查一下下面这个依赖有没有安装:

"hexo-renderer-sass": "^0.4.0",

感谢回复,我查了一下这个依赖的版本:

npm -v hexo-renderer-sass                                                                                          1 ↵ songshgeo@ShuangdeMacBook-Pro
7.7.6

这是 7.7.x 和 0.4 版本差异的问题吗。差这么远的版本吗..

from hexo-theme-minos.

ppoffice avatar ppoffice commented on June 27, 2024

npm -v hexo-renderer-sass 打印的是npm的版本,npm -v后面不接受其他参数。

https://stackoverflow.com/questions/10972176/find-the-version-of-an-installed-npm-package

from hexo-theme-minos.

SongshGeo avatar SongshGeo commented on June 27, 2024

npm -v hexo-renderer-sass 打印的是npm的版本,npm -v后面不接受其他参数。

https://stackoverflow.com/questions/10972176/find-the-version-of-an-installed-npm-package

@ppoffice 啊感谢,抱歉不太熟悉这些,给您添麻烦了。
但我确实查了一下,是安装了的:
而且我记得一开始没安装这个依赖的时候,minos 是会报错 不能打开 hexo s 的

npm view hexo-renderer-sass version                                                                                    songshgeo@ShuangdeMacBook-Pro
0.4.0

from hexo-theme-minos.

ppoffice avatar ppoffice commented on June 27, 2024

npm view hexo-renderer-sass version
上面这条命令查看的是npm源上的包的最新版本,而不是本地安装的版本。

from hexo-theme-minos.

SongshGeo avatar SongshGeo commented on June 27, 2024

@ppoffice 真的很抱歉一次次打扰,我又仔细操作了一遍 hexo-renderer-sass 依赖项的安装,还是没找到问题所在。

我做了如下操作:

  1. 首先我使用这个命令查看本地包
    npm ls hexo-renderer-sass
    它显示了包的版本和位置:
>>> [email protected] /Users/songshgeo/Documents/Pycharm/MyBlogs/blogs
└── [email protected] -> /Users/songshgeo/Documents/Pycharm/MyBlogs/blogs/node_modules/[email protected]@hexo-renderer-sass
  1. 在这样的情况下,我开启了hexo s服务,题目中所示的问题依然存在

  2. 我使用 npm uninstall hexo-renderer-sass 卸载依赖项后重新查看,得到如下结果

npm ls hexo-renderer-sass 

>>> [email protected] /Users/songshgeo/Documents/Pycharm/MyBlogs/blogs
└── (empty)
  1. 可见,现在查不到这个依赖项了,而且这时候再尝试使用 hexo s 会报错缺少依赖项
INFO  Checking dependencies
ERROR Package hexo-renderer-sass is not installed.
ERROR Please install the missing dependencies in the root directory of your Hexo site.
  1. 我使用 cnpm 重新安装依赖项(我无法使用 npm install 命令安装 hexo-renderer-sass,这个问题好像非常普遍,我参考网上博客的建议使用淘宝镜像安装的)
cnpm install hexo-renderer-sass
>>>
✔ Installed 1 packages
✔ Linked 1 latest versions
✔ Run 0 scripts
✔ All packages installed (used 197ms(network 196ms), speed 11.05KB/s, json 1(2.17KB), tarball 0B)
  1. 同1-2步骤。再次打开 hexo s 进行测试,发现重新安装后 hexo s 可以正确运行,但如题,搜索按钮不正确的问题仍然存在。

注:我在 Pycharm 里操作,它也会自动提示我安装依赖项。在使用 cnpm 重新安装依赖项后,IDE 提示是有对应版本的包的。

from hexo-theme-minos.

ppoffice avatar ppoffice commented on June 27, 2024

运行hexo s或者hexo g的日志是什么样的?有报错么?

from hexo-theme-minos.

SongshGeo avatar SongshGeo commented on June 27, 2024

运行hexo s或者hexo g的日志是什么样的?有报错么?
@ppoffice

抱歉才回复,经您指点,查了hexo的日志才看到有一个报错:

ERROR {
  err: Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (88)
  For more information on which environments are supported please see:
  https://github.com/sass/node-sass/releases/tag/v4.14.1

看起来是版本不适配的问题,顺着这个报错我去安装了新的 node-sass 版本。
首先 Minos 的依赖中找到了 hexo-renderer-sass 包:

 "hexo-renderer-sass": "^0.4.0", 

而这个包中的 node-sass 依赖版本已经过老了:

"node-sass": "^4.5.3"

我把这个包的node-sass版本手动改成了最新的,然后重新安装,问题解决。

再次感谢您的耐心解答。

from hexo-theme-minos.

PenchantLeo avatar PenchantLeo commented on June 27, 2024

老哥,我也遇到这个问题了,hexo s之后出现这个提示,但是没有报错
Plugin load failed: %s hexo-renderer-sass

from hexo-theme-minos.

dqwyy avatar dqwyy commented on June 27, 2024

image

代码块显示错误

image

跟题主一样的状况

image

显示有个CSS文档404了

C:\Users\dqwyy\Desktop\New Folder>hexo s
INFO  Validating config
ERROR {
  err: Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (93)
  For more information on which environments are supported please see:
  https://github.com/sass/node-sass/releases/tag/v4.14.1
      at module.exports (C:\Users\dqwyy\Desktop\New Folder\node_modules\[email protected]@node-sass\lib\binding.js:13:13)
      at Object.<anonymous> (C:\Users\dqwyy\Desktop\New Folder\node_modules\[email protected]@node-sass\lib\index.js:14:35)
      at Module._compile (node:internal/modules/cjs/loader:1105:14)
      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
      at Module.load (node:internal/modules/cjs/loader:981:32)
      at Function.Module._load (node:internal/modules/cjs/loader:822:12)
      at Module.require (node:internal/modules/cjs/loader:1005:19)
      at require (node:internal/modules/cjs/helpers:102:18)
      at Object.<anonymous> (C:\Users\dqwyy\Desktop\New Folder\node_modules\[email protected]@hexo-renderer-sass\lib\renderer.js:3:12)
      at Module._compile (node:internal/modules/cjs/loader:1105:14)
      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
      at Module.load (node:internal/modules/cjs/loader:981:32)
      at Function.Module._load (node:internal/modules/cjs/loader:822:12)
      at Module.require (node:internal/modules/cjs/loader:1005:19)
      at req (C:\Users\dqwyy\Desktop\New Folder\node_modules\hexo\lib\hexo\index.js:292:23)
      at C:\Users\dqwyy\Desktop\New Folder\node_modules\hexo-renderer-sass\index.js:4:20
      at C:\Users\dqwyy\Desktop\New Folder\node_modules\hexo\lib\hexo\index.js:305:14
      at tryCatcher (C:\Users\dqwyy\Desktop\New Folder\node_modules\bluebird\js\release\util.js:16:23)
      at Promise._settlePromiseFromHandler (C:\Users\dqwyy\Desktop\New Folder\node_modules\bluebird\js\release\promise.js:547:31)
      at Promise._settlePromise (C:\Users\dqwyy\Desktop\New Folder\node_modules\bluebird\js\release\promise.js:604:18)
      at Promise._settlePromise0 (C:\Users\dqwyy\Desktop\New Folder\node_modules\bluebird\js\release\promise.js:649:10)
      at Promise._settlePromises (C:\Users\dqwyy\Desktop\New Folder\node_modules\bluebird\js\release\promise.js:729:18)
} Plugin load failed: %s hexo-renderer-sass
INFO  =======================================
███╗   ███╗ ██╗ ███╗   ██╗  ██████╗  ███████╗
████╗ ████║ ██║ ████╗  ██║ ██╔═══██╗ ██╔════╝
██╔████╔██║ ██║ ██╔██╗ ██║ ██║   ██║ ███████╗
██║╚██╔╝██║ ██║ ██║╚██╗██║ ██║   ██║ ╚════██║
██║ ╚═╝ ██║ ██║ ██║ ╚████║ ╚██████╔╝ ███████║
╚═╝     ╚═╝ ╚═╝ ╚═╝  ╚═══╝  ╚═════╝  ╚══════╝
=============================================
INFO  Checking dependencies
INFO  Checking if the configuration file exists
INFO  Checking language names against RFC5646 specs
INFO  Start processing
INFO  Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.

我把这个包的node-sass版本手动改成了最新的,然后重新安装,问题解决。

请问具体应该如何改版本呢?真的非常喜欢这个主题

from hexo-theme-minos.

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.