Closed zhangxiann closed 4 years ago
感谢这么快速的回复和帮助
Icarus运行在Node.js 8.3.0或更新的版本上。 它同时依赖Hexo 4.2.0或更新版本。 除此之外,请确保所有的Node.js依赖已安装。 你可以在themes/icarus/package.json 文件的peerDependencies部分下找到这些依赖。 同时,从你的站点中移除所有无用的Node.js依赖,否则它们可能会导致Icarus出现奇怪的问题
不知道为什么npm install
命令安装不了 peerDependencies 的package,因此我找到一篇解答:https://stackoverflow.com/questions/46053414/npm-warn-requires-a-peer-of-but-none-is-installed-you-must-install-peer ,里面说使用npm install --save-dev xxxxx
一个一个手动安装。我没有装多余的package
装完之后,还是报这个错。但是我已经装了,npm install
显示如下,这是全装了吗?
PS D:\blog\hexoBlog> cd .\themes\icarus\
PS D:\blog\hexoBlog\themes\icarus> npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
up to date in 2.493s
35 packages are looking for funding
run `npm fund` for details
我安装 peerDependencies 的方法有问题吗?应该如何安装?
@ppoffice 你在运行任意hexo命令的时候应该有Warning吧?你照着warning上的提示运行npm安装命令即可。
只是说需要自己安装
,没有说怎么安装。所以我上网搜,有的说npm版本太老,我的版本是6.14.4
了。stackoverflow 其中一个说npm install --save-dev xxxxx
一个一个手动安装。
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of bulma-stylus@0.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of deepmerge@^4.2.2 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of hexo@^4.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of hexo-component-inferno@^0.2.4 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of hexo-log@^1.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of hexo-pagination@^1.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of hexo-renderer-inferno@^0.1.3 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of hexo-renderer-stylus@^1.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of hexo-util@^1.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of inferno@^7.3.3 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of inferno-create-element@^7.3.3 but none is installed. You must install peer dependencies yourself.
npm WARN hexo-theme-icarus@3.0.1 requires a peer of moment@^2.22.2 but none is installed. You must install peer dependencies yourself.
@xiechuanyu 不是。你运行hexo s
然后把所有日志贴出来。
可以了。谢谢你。我是太小白了。我把themes\icarus\package.json
里的peerDependencies
的内容拷贝到 blog 的package.json
的dependencies
里面,在blog
的主目录下执行npm install
就行了。
再次感谢。
再次感谢作者,做出这么优秀的主题
hexo g 报错
System and Environment The version and configuration of Hexo and Icarus.
hexo version
command)_config.yml
Writing
new_post_name: :title.md # File name of new posts default_layout: post titlecase: false # Transform title into titlecase external_link: enable: true # Open external links in new tab field: site # Apply to the whole site exclude: '' filename_case: 0 render_drafts: false post_asset_folder: false relative_link: false future: true highlight: enable: true line_number: true auto_detect: false tab_replace: '' wrap: true hljs: false
Home page setting
path: Root path for your blogs index page. (default = '')
per_page: Posts displayed per page. (0 = disable pagination)
order_by: Posts order. (Order by date descending by default)
index_generator: path: '' per_page: 10 order_by: -date
Category & Tag
default_category: uncategorized category_map: tag_map:
Metadata elements
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true
Date / Time format
Hexo uses Moment.js to parse and display date
You can customize the date format as defined in
http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD time_format: HH:mm:ss
Use post's date for updated date unless set in front-matter
use_date_for_updated: false
Pagination
Set per_page to 0 to disable pagination
per_page: 10 pagination_dir: page
Include / Exclude file(s)
include:/exclude: options only apply to the 'source/' folder
include: exclude: ignore:
Extensions
Plugins: https://hexo.io/plugins/
Themes: https://hexo.io/themes/
theme: landscape
theme: icarus
Deployment
Docs: https://hexo.io/docs/deployment.html
deploy: type: git repo: https://github.com/xiechuanyu/xiechuanyu.github.io.git branch: master
Version of the configuration file
version: 3.0.0
Icarus theme variant, can be "default" or "cyberpunk"
variant: default
Path or URL to the website's logo
logo: /img/logo.svg
Page metadata configurations
head:
URL or path to the website's icon
Page top navigation bar configurations
navbar:
Naviagtion menu items
Page footer configurations
footer:
Links to be shown on the right of the footer section
Article related configurations
article:
Code highlight settings
Search plugin configurations
https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Search/
search: type: insight
Comment plugin configurations
https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Comment/
comment: type: disqus
Disqus shortname
Donate plugin configurations
https://blog.zhangruipeng.me/hexo-theme-icarus/categories/Plugins/Donation/
donates:
Alipay donate button configurations
Share plugin configurations
https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/Share/
share: type: sharethis
URL to the ShareThis share plugin script
Sidebar configurations.
Please be noted that a sidebar is only visible when it has at least one widget
sidebar:
Left sidebar configurations
Sidebar widget configurations
http://ppoffice.github.io/hexo-theme-icarus/categories/Widgets/
widgets:
Profile widget configurations
Plugin configurations
https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/
plugins:
Enable page startup animations
CDN provider settings
https://ppoffice.github.io/hexo-theme-icarus/Configuration/Theme/speed-up-your-site-with-custom-cdn/
providers:
Name or URL template of the JavaScript and/or stylesheet CDN provider
ERROR Asset render failed: css/cyberpunk.css Error: D:/blog/hexoBlog/themes/icarus/include/style/base.styl:46:29 42| 43| $logo-height ?= 1.75rem 44| 45| // FIXME: https://github.com/groenroos/bulma-stylus/issues/11 46| @import bulma-stylus-root + '/utilities/initial-variables' -----------------------------------^ 47| @import bulma-stylus-root + '/utilities/functions' 48| @import bulma-stylus-root + '/utilities/derived-variables' 49|
failed to locate @import file ../../../../node_modules/bulma-stylus/stylus/utilities/initial-variables.styl