hexojs / hexo-cli Goto Github PK
View Code? Open in Web Editor NEWCommand line interface for Hexo
License: MIT License
Command line interface for Hexo
License: MIT License
I've tried to build hexo-site almost one hour, but didn't solve this problem:
ERROR Error: Cannot find module 'cuid'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/Users/suevalov/Development/projects/test/node_modules/hexo/node_modules/warehouse/lib/types/cuid.js:5:12)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/Users/suevalov/Development/projects/test/node_modules/hexo/node_modules/warehouse/lib/types/index.js:9:16)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/Users/suevalov/Development/projects/test/node_modules/hexo/node_modules/warehouse/lib/schema.js:4:13)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
Unhandled rejection TypeError: Cannot read property 'then' of undefined
at /Users/suevalov/Development/projects/test/node_modules/hexo-cli/lib/index.js:82:21
at tryCatcher (/Users/suevalov/Development/projects/test/node_modules/hexo-cli/node_modules/bluebird/js/main/util.js:26:23)
at Promise._settlePromiseFromHandler (/Users/suevalov/Development/projects/test/node_modules/hexo-cli/node_modules/bluebird/js/main/promise.js:503:31)
at Promise._settlePromiseAt (/Users/suevalov/Development/projects/test/node_modules/hexo-cli/node_modules/bluebird/js/main/promise.js:577:18)
at Async._drainQueue (/Users/suevalov/Development/projects/test/node_modules/hexo-cli/node_modules/bluebird/js/main/async.js:128:12)
at Async._drainQueues (/Users/suevalov/Development/projects/test/node_modules/hexo-cli/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/suevalov/Development/projects/test/node_modules/hexo-cli/node_modules/bluebird/js/main/async.js:15:14)
at processImmediate [as _immediateCallback] (timers.js:367:17)
hexo-cli: 0.1.8
os: Darwin 14.5.0 darwin x64
http_parser: 2.3
node: 0.12.7
v8: 3.28.71.19
uv: 1.6.1
zlib: 1.2.8
modules: 14
openssl: 1.0.1p
Any suggestions?
就像vue3项目初始化那样,使用 npm create
不用往电脑安装脚手架
If I specify cwd
, hexo-cli will loadModule in it to find local hexo. But my structure will break it.
|- docs <- cwd of hexo project
|- _config.yml
`- other files
|- node_modules
`- hexo <- where hexo really is
`- package.json
I will install dependencies in the directory where I run hexo --cwd docs
, but it can't find hexo becuase it's not under docs/node_modules
.
I think hexo-cli can try loadModule in process.cwd
if it can't find it under cwd
.
Does someone would you please release a v2.0.0? (Current master branch has breaking changes)
We are receiving some comments of vulnerability issue of package dependencies in hexojs/hexo#3475 from users.
Sorry, I haven't permission to publish npm.
If publish I will write a release note & release news.
Thanks :)
ref hexojs/hexo#1711
source below:
When using some commands Hexo will change the color of my text in the command prompt. The problem is that it never changes the color back again. Look at the example below where it changes the text color from orange to red.
Are there any ways to prevent this? It's a bit annoying.
Why have class Context extend EventEmitter at all ? in the package hexoc-cli i don't see the methods of EventEmitter used at all, so why extend from this class ?
I see context is defined HERE like so :-
class Context extends EventEmitter { // code here }
and then ofcourse being used in the index(hexo.ts) file like so LINK :-
function entry(cwd = process.cwd(), args) {
args = camelCaseKeys(
args || minimist(process.argv.slice(2),
{ string: ['_', 'p', 'path', 's' ,'slug']
}));
let hexo = new Context(cwd, args);
// more code here
}
I recently created a new Ubuntu 20.04 install. I installed NodeJS from the NodeSource repo, and installed hexo-cli
with npm i -g hexo-cli
(as root). Then, I cloned my repository, ran npm i
, then hexo g
. All the files that it should have generated are there (and listed to the console); however, every single file has a zero length - there's no content!
hexo s
does show the content, so I know it's able to read the various templates and put them all together. It's a strange scenario; I'm happy to provide any more information you may need to diagnose or reproduce this.
My hexo --version
:
hexo: 4.2.0
hexo-cli: 3.1.0
os: Linux 5.4.0-33-generic linux x64
node: 14.3.0
v8: 8.1.307.31-node.33
uv: 1.37.0
zlib: 1.2.11
brotli: 1.0.7
ares: 1.16.0
modules: 83
nghttp2: 1.40.0
napi: 6
llhttp: 2.0.4
openssl: 1.1.1g
cldr: 37.0
icu: 67.1
tz: 2019c
unicode: 13.0
Is this a BUG REPORT or FEATURE REQUEST?
Maybe It's a bug.
What version you use:
hexo-cli: 3.1.0
os: Linux 4.4.0-18362-Microsoft linux x64
http_parser: 2.9.3
node: 10.20.1
v8: 6.8.275.32-node.56
uv: 1.34.2
zlib: 1.2.11
brotli: 1.0.7
ares: 1.15.0
modules: 64
nghttp2: 1.39.2
napi: 6
openssl: 1.1.1e
icu: 64.2
unicode: 12.1
cldr: 35.1
tz: 2019c
What happened:
When I execute hexo init 0x400
, It will create a project named 1024
instead of 0x400
. Always appears this issue when the target project is a Hexadecimal or Octal number. More instances,
$ hexo init 070 ==> create folder named: 70
$ hexo init 0xAB ==> create folder named: 171
What you expected to happen:
When I execute hexo init 0x400
, I expect to initialize the project into the 0x400
folder.
How to reproduce it (as minimally and precisely as possible):
hexo init 0x400
Anything else we need to know?:
It seems this issue introduces by minimist. It aways parses as a number with leading 0x
.
I'm trying the latest hexo-cli
from GitHub.
$ hexo init
INFO Cloning hexo-starter to ~/test
INFO git clone failed. Copying data instead.
ERROR Error: ENOENT: no such file or directory, scandir '/home/leesei/.nvm/versions/node/v5.1.0/lib/node_modules/hexo-cli/assets'
at Error (native)
Unhandled rejection TypeError: Cannot read property 'then' of undefined
at /home/leesei/.nvm/versions/node/v5.1.0/lib/node_modules/hexo-cli/lib/index.js:83:21
at tryCatcher (/home/leesei/.nvm/versions/node/v5.1.0/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/util.js:11:23)
at Promise._settlePromiseFromHandler (/home/leesei/.nvm/versions/node/v5.1.0/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:489:31)
at Promise._settlePromise (/home/leesei/.nvm/versions/node/v5.1.0/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:546:18)
at Promise._settlePromise0 (/home/leesei/.nvm/versions/node/v5.1.0/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:591:10)
at Promise._settlePromises (/home/leesei/.nvm/versions/node/v5.1.0/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:670:18)
at Promise._reject (/home/leesei/.nvm/versions/node/v5.1.0/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:634:18)
at Promise._settlePromise (/home/leesei/.nvm/versions/node/v5.1.0/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:561:21)
at Promise._settlePromise0 (/home/leesei/.nvm/versions/node/v5.1.0/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:591:10)
at Promise._settlePromises (/home/leesei/.nvm/versions/node/v5.1.0/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:670:18)
at Promise._reject (/home/leesei/.nvm/versions/node/v5.1.0/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:634:18)
at Promise._rejectCallback (/home/leesei/.nvm/versions/node/v5.1.0/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:452:10)
at ReductionPromiseArray.PromiseArray._reject (/home/leesei/.nvm/versions/node/v5.1.0/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise_array.js:136:19)
at Promise._settlePromise (/home/leesei/.nvm/versions/node/v5.1.0/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:543:21)
at Promise._settlePromise0 (/home/leesei/.nvm/versions/node/v5.1.0/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:591:10)
at Promise._settlePromises (/home/leesei/.nvm/versions/node/v5.1.0/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:670:18)
$ git clone https://github.com/hexojs/hexo-starter.git .
Cloning into '.'...
remote: Counting objects: 24, done.
remote: Total 24 (delta 0), reused 0 (delta 0), pack-reused 23
Unpacking objects: 100% (24/24), done.
Checking connectivity... done.
Also:
.git
after clonegit
It would be great if when running hexo init
it would use yarn
if the user has it installed, and fall-back to npm
if not.
There's deprecation warning while using with Node.js 8
(node:65160) [DEP0061] DeprecationWarning: fs.SyncWriteStream is deprecated.
Hey guys 👋
First and foremost, thank you all for maintaining this awesome project.
I was just reading the Themes section in the docs and I didn't find anything related to a CLI command to create a new theme. I also didn't find anything in previous issues.
Wouldn't be cool to have something similar? Or do you guys think this is not necessary?
Feature idea: command-line plugin management
hexo plugin enable (hexo-)generator-feed
=> add entry in plugins in _config.yml
+ add default/example plugin config (extracted from package.json for instance)hexo plugin disable (hexo-)generator-feed
=> remove entry in pluginshexo plugin search
=> npm search hexo-hexo plugin install (hexo-)generator-feed
=> npm install hexo-generator-feed && hexo plugin enable hexo-generator-feedhexo plugin remove (hexo-)generator-feed
=> hexo plugin disable hexo-generator-feed && npm remove hexo-generator-feedhexo plugin list/list-installed
=> list installed pluginsWhat do you think?
针对简体中文用户的提示:在提交 issue 时请不要删除下面的模板,按照步骤提供相关信息将有助于我们调查你的问题。请尽量使用英语描述你的问题,这可以让更多的人帮助到你。
If you find that markdown files are not rendered as expected, please go to https://marked.js.org/demo/ to see if it can be reproduced there. If it can be reproduced, please file a bug to https://github.com/markedjs/marked.
If you want help on your bug, please also send us the git repository (GitHub, GitLab, Bitbucket etc...) where your hexo code is stored. It would greatly help. If you prefer not to have your hexo code out in public, please upload to a private GitHub repository and grant read-only access to hexojs/core
Please take extra precaution not to attach any secret environment variables (likes password or GitHub Personal Access Token).
-->
Please check followings before submitting a new issue.
hexo version
to check)When I want to init hexo ,there is an error saying [Error: EPERM: operation not permitted, mkdir 'D:'
Node.js & npm version
Node.js 15.12.0
npm -7.6.3
Your site _config.yml
(Optional)
Your theme _config.yml
(Optional)
Hexo and Plugin version(npm ls --depth 0
)
Your package.json package.json
nothing
When declare the plugin under devDependencies , even the plugin has been installed , for example :
"dependencies": {
"hexo": "^3.2.0",
"hexo-generator-archive": "^0.1.4",
"hexo-generator-category": "^0.1.3",
"hexo-generator-feed": "^1.1.0",
"hexo-generator-index": "^0.2.0",
"hexo-generator-tag": "^0.2.0",
"hexo-renderer-marked": "^0.2.10",
"hexo-renderer-stylus": "^0.3.1"
},
"devDependencies": {
"hexo-server": "^0.2.0"
}
then when you type hexo server , the output is :
$ hexo server
Usage: hexo <command>
Commands:
clean Removed generated files and cache.
config Get or set configurations.
deploy Deploy your website.
generate Generate static files.
help Get help on a command.
init Create a new Hexo folder.
list List the information of the site
migrate Migrate your site from other system to Hexo.
new Create a new post.
publish Moves a draft post from _drafts to _posts folder.
render Render files with renderer plugins.
version Display version information.
Global Options:
--config Specify config file instead of using _config.yml
--cwd Specify the CWD
--debug Display all verbose messages in the terminal
--draft Display draft posts
--safe Disable all plugins and scripts
--silent Hide output on console
For more help, you can use 'hexo help [command]' for the detailed information
or you can check the docs: http://hexo.io/docs/
While writing a release note for v3, I noticed this PR #77, so hexo init
of hexo-cli@3 still uses [email protected].
This serves as a reminder that after the following tasks:
Then, hexo-starter submodule in this repo should be updated accordingly, then publish this plugin as [email protected].
Can't run npm install hexo-cli -g
right now - seems to be caused by the new version of Highlight.js (released ~5 hours ago at the time of writing).
Works if you also install highlight.js at the same time, but using the previous version (9.14.2).
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/danp3d/.nvm/versions/node/v10.12.0/lib/node_modules/hexo-cli/node_modules/highlight.js/tools/build.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm uninstall -g hexo-cli
npm install -g hexo-cli
npm install -g [email protected] hexo-cli
{
"name": "hexo-site",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "hexo generate",
"clean": "hexo clean",
"deploy": "hexo deploy",
"server": "hexo server"
},
// "hexo": {
// "version": "5.2.0"
// },
"dependencies": {
"hexo": "^5.0.0",
"hexo-generator-archive": "^1.0.0",
"hexo-generator-category": "^1.0.0",
"hexo-generator-index": "^2.0.0",
"hexo-generator-tag": "^1.0.0",
"hexo-renderer-ejs": "^1.0.0",
"hexo-renderer-marked": "^3.0.0",
"hexo-renderer-stylus": "^2.0.0",
"hexo-server": "^2.0.0"
}
}
$ sudo npm i -g hexo-cli shark@dev
[sudo] password for shark:
/usr/bin/hexo -> /usr/lib/node_modules/hexo-cli/bin/hexo
> [email protected] install /usr/lib/node_modules/hexo-cli/node_modules/dtrace-provider
> node scripts/install.js
> [email protected] postinstall /usr/lib/node_modules/hexo-cli/node_modules/hexo-util
> npm run build:highlight
> [email protected] build:highlight /usr/lib/node_modules/hexo-cli/node_modules/hexo-util
> node scripts/build_highlight_alias.js > highlight_alias.json
sh: highlight_alias.json: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build:highlight: `node scripts/build_highlight_alias.js > highlight_alias.json`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:highlight script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
┌───────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /root/.config │
└───────────────────────────────────────────────────┘
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/hexo-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `npm run build:highlight`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-08-29T17_15_30_204Z-debug.log
As you can see in the log file this is not npm fault or a permission error but hexo-cli post-install that fails. I tried on an updated manjaro (arch-based) and on a fresh installed Antergos (arch-based). I tried sudo npm install gulp-cli -g
and it works.
/root/.npm/_logs/2017-08-29T17_15_30_204Z-debug.log
: https://gist.github.com/noraj1337/66e214101b5cc0ea203eac30d4dd3f90
PS: I already installed successfully hexo-cli on this machine (manjaro) on the past and on various other arch-based systems.
Please check followings before submitting a new feature request.
Execute
hexo init blog
in my window10.
Tips is
INFO Cloning hexo-starter https://github.com/hexojs/hexo-starter.git
fatal: unable to access 'https://github.com/hexojs/hexo-starter.git/': Recv failure: Connection was reset
WARN git clone failed. Copying data instead
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
I execute the cmd:
git clone --recurse-submodules --depth=1 --quiet https://github.com/hexojs/hexo-starter.git blog
It's not work. But if I execute the below cmd:
git clone --recurse-submodules --depth=1 --quiet [email protected]:hexojs/hexo-starter.git blog
It's work.
So I changed $basedir/node_model/hexo_cli/dist/console/init.js
rewite GIT_REPO_URL as [email protected]:hexojs/hexo-starter.git
;
And redo hexo init blog
.
It's work.
I think it's a point you can improve.
Gh0st# hexo clean
[Error: Module did not self-register.]
{ [Error: Cannot find module './build/default/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
{ [Error: Cannot find module './build/Debug/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
ERROR Plugin load failed: hexo-generator-feed
ReferenceError: hexo is not defined
at Object. (/Users/ippotsuko/blog/node_modules/hexo-generator-feed/feed.js:4:10)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (/Users/ippotsuko/blog/node_modules/hexo/lib/hexo/index.js:213:21)
at /Users/ippotsuko/blog/node_modules/hexo-generator-feed/index.js:6:30
at /Users/ippotsuko/blog/node_modules/hexo/lib/hexo/index.js:229:12
at tryCatcher (/Users/ippotsuko/blog/node_modules/hexo/node_modules/bluebird/js/main/util.js:24:31)
at Promise._settlePromiseFromHandler (/Users/ippotsuko/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:454:31)
at Promise._settlePromiseAt (/Users/ippotsuko/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:530:18)
at Promise._settlePromises (/Users/ippotsuko/blog/node_modules/hexo/node_modules/bluebird/js/main/promise.js:646:14)
at Async._drainQueue (/Users/ippotsuko/blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:79:16)
at Async._drainQueues (/Users/ippotsuko/blog/node_modules/hexo/node_modules/bluebird/js/main/async.js:89:10)
at Immediate.Async.drainQueues as _onImmediate
at processImmediate as _immediateCallback
INFO Deleted database.
mac已装xcode和命令行工具 node版本0.12
When I run hexo g
or hexo s
, I get:
Error: pandoc exited with code 2: --smart/-S has been removed. Use +smart or -smart extension instead.
For example: pandoc -f markdown+smart -t markdown-smart.
It seems that v4.3.1 does not contain #432.
see also hexojs/hexo#5465
Hi team,
I've tried to contact you via email, but there is no response.
Can you please contact me back - [email protected]
Thanks,
Docs setup section mentions that hexo init
should have created a scripts
directory but when I run the command this folder was not created.
$ hexo version
hexo-cli: 0.1.7
os: Darwin 14.4.0 darwin x64
http_parser: 2.5.0
node: 2.3.4
v8: 4.2.77.20
uv: 1.6.1
zlib: 1.2.8
ares: 1.10.1-DEV
modules: 44
openssl: 1.0.2d
$ hexo init hexo-example
$ ls -la hexo-example
.
..
.gitignore
_config.yml
package.json
scaffolds
source
themes
Should the docs be updated to remove it or the folder should be added to the hexo-cli init assets that are copied?
Thanks
running latest node and latest hexo on linux:
hexo init firstWeb
produces error:
Unknown Syntax Error: Unsupported option name ("--production").
$ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--cache-folder #0]
WARN Failed to install dependencies. Please run 'npm install' manually!
Stack trace:
Cloning hexo-starter https://github.com/hexojs/hexo-starter.git
Cloning into '/home/vic/Documents/GitHub/m/h'...
remote: Enumerating objects: 30, done.
remote: Counting objects: 100% (30/30), done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 161 (delta 12), reused 12 (delta 4), pack-reused 131
Receiving objects: 100% (161/161), 31.79 KiB | 2.27 MiB/s, done.
Resolving deltas: 100% (74/74), done.
Submodule 'themes/landscape' (https://github.com/hexojs/hexo-theme-landscape.git) registered for path 'themes/landscape'
Cloning into '/home/vic/Documents/GitHub/m/h/themes/landscape'...
remote: Enumerating objects: 1063, done.
remote: Total 1063 (delta 0), reused 0 (delta 0), pack-reused 1063
Receiving objects: 100% (1063/1063), 3.21 MiB | 8.29 MiB/s, done.
Resolving deltas: 100% (585/585), done.
Submodule path 'themes/landscape': checked out '73a23c51f8487cfcd7c6deec96ccc7543960d350'
INFO Install dependencies
Unknown Syntax Error: Unsupported option name ("--production").
$ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--cache-folder #0]
WARN Failed to install dependencies. Please run 'npm install' manually!
根据官网把这一段内容放到package.json中后 报错如下
{
--
"hexo": {
"version": "3.2.2"
}
}
FATAL Cannot read property 'code' of undefined
TypeError: Cannot read property 'code' of undefined
at /home/node-v12.13.1-linux-x64/lib/node_modules/hexo-cli/lib/find_pkg.js:21:26
at tryCatcher (/home/node-v12.13.1-linux-x64/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/node-v12.13.1-linux-x64/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/home/node-v12.13.1-linux-x64/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/home/node-v12.13.1-linux-x64/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/home/node-v12.13.1-linux-x64/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promise.js:725:18)
at _drainQueueStep (/home/node-v12.13.1-linux-x64/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/home/node-v12.13.1-linux-x64/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/home/node-v12.13.1-linux-x64/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/home/node-v12.13.1-linux-x64/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:439:21)
Hi!
I think that the init
command should change the value of the name property in the generated package.json
file.
pnpm is now more popular than yarn, so is there a need to prioritize the use of pnpm?
No response
This problem occurs on hexo init
Error: ENOENT: no such file or directory, scandir '/usr/lib/node_modules/hexo-cli/assets'
在使用pnpm i后执行 hexo se后发现缺少两个包,分别是:'hexo-util'、'moment'
在使用pnpm i后执行 hexo se后发现缺少两个包,分别是:'hexo-util'、'moment'
No response
No response
No response
when I run sudo npm i -g hexo-cli
, I got the following error.
/usr/local/bin/hexo -> /usr/local/lib/node_modules/hexo-cli/bin/hexo
> [email protected] install /usr/local/lib/node_modules/hexo-cli/node_modules/fsevents
> node install
> [email protected] install /usr/local/lib/node_modules/hexo-cli/node_modules/dtrace-provider
> node scripts/install.js
> [email protected] postinstall /usr/local/lib/node_modules/hexo-cli/node_modules/hexo-util
> npm run build:highlight
> [email protected] build:highlight /usr/local/lib/node_modules/hexo-cli/node_modules/hexo-util
> node scripts/build_highlight_alias.js > highlight_alias.json
sh: 1: cannot create highlight_alias.json: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build:highlight: `node scripts/build_highlight_alias.js > highlight_alias.json`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build:highlight script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
┌───────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /home/ljn/.config │
└───────────────────────────────────────────────────────┘
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ljn/.npm/_logs/2017-07-19T06_24_27_819Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] postinstall: `npm run build:highlight`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ljn/.npm/_logs/2017-07-19T06_24_29_497Z-debug.log
Is it a problem with npm? How to solve it ?
We could prompt the user:
${target} not empty, please run `hexo init` on an empty folder and then copy your files into it
In the folder populated by hexo init
, _config.yml
doesn't contain archive_generator
section, and the value of per_page
variable on the root level is used instead.
per_page: 10
...
archive_generator:
per_page: 0
Please check followings before submitting a new feature request.
Recently I tried to test some plugins in a fresh Windows, I created a dummy blog with hexo init
but forgot to install Git beforehand.
Lines 29 to 36 in f15fccb
The git command failed and copyAsset()
is executed instead.
Lines 88 to 90 in f15fccb
That failed too because "assets/" folder (a submodule that points to hexo-starter) is not published.
I can think of two approaches:
copyAsset()
and check git existence before running L30: if (!commandExistsSync('git')) log.warn('Please install git')
@hexojs/core
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.