hexojs / hexo

A fast, simple & powerful blog framework, powered by Node.js.
https://hexo.io
MIT License
39.6k stars 4.87k forks source link

ERROR Plugin load failed: hexo-cli #5236

Closed muyuuuu closed 1 year ago

muyuuuu commented 1 year ago

Check List

Please check followings before submitting a new issue.

Expected behavior

remove this error info ?

2023-07-04_03-43

and, different path got different behavior

image

How to reproduce?

sudo npm install -g hexo-cli

Environment & Settings

$ node -v                                              
v20.3.1
$ npm -v                                                                                     
8.19.2

Hexo and Plugin version(npm ls --depth 0)

hexo-site@0.0.0 /home/muyu/Documents/blog
├── @babel/code-frame@7.22.5 extraneous
├── @babel/generator@7.22.5 extraneous
├── @babel/helper-environment-visitor@7.22.5 extraneous
├── @babel/helper-function-name@7.22.5 extraneous
├── @babel/helper-hoist-variables@7.22.5 extraneous
├── @babel/helper-split-export-declaration@7.22.5 extraneous
├── @babel/helper-string-parser@7.22.5 extraneous
├── @babel/helper-validator-identifier@7.22.5 extraneous
├── @babel/highlight@7.22.5 extraneous
├── @babel/parser@ extraneous
├── @babel/template@7.22.5 extraneous
├── @babel/traverse@7.22.5 extraneous
├── @babel/types@7.22.5 extraneous
├── @devexpress/error-stack-parser@ extraneous
├── @jridgewell/gen-mapping@0.3.3 extraneous
├── @jridgewell/resolve-uri@3.1.0 extraneous
├── @jridgewell/set-array@1.1.2 extraneous
├── @jridgewell/sourcemap-codec@1.4.15 extraneous
├── @jridgewell/trace-mapping@0.3.18 extraneous
├── @nodelib/fs.scandir@2.1.5 extraneous
├── @nodelib/fs.stat@2.0.5 extraneous
├── @nodelib/fs.walk@1.2.8 extraneous
├── @types/lodash@4.14.195 extraneous
├── @types/minimatch@ extraneous
├── @types/minimist@ extraneous
├── @types/normalize-package-data@ extraneous
├── @types/parse-json@ extraneous
├── @vue/compiler-core@3.3.4 extraneous
├── @vue/compiler-dom@3.3.4 extraneous
├── @vue/compiler-sfc@3.3.4 extraneous
├── @vue/compiler-ssr@3.3.4 extraneous
├── @vue/reactivity-transform@3.3.4 extraneous
├── @vue/shared@3.3.4 extraneous
├── array-union@ extraneous
├── arrify@ extraneous
├── base64-js@1.5.1 extraneous
├── bindings@1.5.0 extraneous
├── buffer@5.7.1 extraneous
├── callsite-record@4.1.5 extraneous
├── callsite@ extraneous
├── callsites@ extraneous
├── cli-spinners@2.9.0 extraneous
├── co@ extraneous
├── cosmiconfig@7.1.0 extraneous
├── create-react-class@ extraneous
├── decamelize-keys@1.1.1 extraneous
├── depcheck@1.4.3 extraneous
├── deps-regex@ extraneous
├── dir-glob@ extraneous
├── error-ex@ extraneous
├── escape-goat@ extraneous
├── estree-walker@ extraneous
├── fast-glob@3.3.0 extraneous
├── fastq@1.15.0 extraneous
├── fbjs@ extraneous
├── file-uri-to-path@1.0.0 extraneous
├── find-yarn-workspace-root2@ extraneous
├── gitalk@1.8.0
├── giturl@1.0.3 extraneous
├── globals@ extraneous
├── globby@11.1.0 extraneous
├── gulp-mathjax-page@1.1.0
├── gulp@3.9.1
├── hard-rejection@ extraneous
├── hexo-asset-image@0.0.5 (git+ssh://git@github.com/CodeFalling/hexo-asset-image.git#3c114cf0c0343ab28469635085b225fcae7fb9d3)
├── hexo-cli@4.3.1
├── hexo-deployer-git@2.1.0
├── hexo-footnotes@1.0.2
├── hexo-generator-archive@0.1.5
├── hexo-generator-category@0.1.3
├── hexo-generator-feed@2.2.0
├── hexo-generator-index@0.2.1
├── hexo-generator-searchdb@1.4.1
├── hexo-generator-sitemap@2.2.0
├── hexo-generator-tag@0.2.0
├── hexo-helper-live2d@3.1.1
├── hexo-pdf@1.1.1
├── hexo-related-popular-posts@4.0.0
├── hexo-renderer-ejs@0.3.1
├── hexo-renderer-kramed@0.1.4
├── hexo-renderer-stylus@0.3.3
├── hexo-server@0.3.3
├── hexo-symbols-count-time@0.6.3
├── hexo-tag-aplayer@3.0.4
├── hexo-tag-cloud@2.1.2
├── hexo-wordcount@6.0.1
├── hexo@3.9.0
├── highlight-es@ extraneous
├── human-signals@ extraneous
├── ieee754@ extraneous
├── ignore@5.2.4 extraneous
├── immutable@4.3.0 extraneous
├── import-fresh@ extraneous
├── is-arrayish@ extraneous
├── is-es2016-keyword@ extraneous
├── is-interactive@ extraneous
├── is-plain-obj@ extraneous
├── is-unicode-supported@ extraneous
├── isomorphic-fetch@ extraneous
├── jsesc@ extraneous
├── json-parse-even-better-errors@ extraneous
├── lines-and-columns@ extraneous
├── load-yaml-file@ extraneous
├── log-symbols@ extraneous
├── magic-string@0.30.0 extraneous
├── merge-stream@ extraneous
├── merge2@1.4.1 extraneous
├── minimist-options@ extraneous
├── multimatch@ extraneous
├── nan@2.17.0 extraneous
├── nanoid@3.3.6 extraneous
├── node-emoji@ extraneous
├── npm-check@6.0.1 extraneous
├── ora@ extraneous
├── parent-module@ extraneous
├── parse-json@ extraneous
├── path-type@ extraneous
├── pkg-dir@ extraneous
├── please-upgrade-node@ extraneous
├── postcss@8.4.24 extraneous
├── preferred-pm@ extraneous
├── promise@7.3.1 extraneous
├── pupa@ extraneous
├── query-ast@1.0.5 extraneous
├── queue-microtask@1.2.3 extraneous
├── quick-lru@ extraneous
├── read-pkg-up@ extraneous
├── read-pkg@ extraneous
├── redent@ extraneous
├── require-package-name@ extraneous
├── resolve-from@ extraneous
├── reusify@1.0.4 extraneous
├── run-parallel@1.2.0 extraneous
├── rxjs@ extraneous
├── sass@1.63.6 extraneous
├── scss-parser@1.0.6 extraneous
├── semver-compare@ extraneous
├── setimmediate@ extraneous
├── slash@ extraneous
├── source-map-js@1.0.2 extraneous
├── stackframe@1.3.4 extraneous
├── strip-final-newline@ extraneous
├── throat@6.0.2 extraneous
├── to-fast-properties@ extraneous
├── trim-newlines@ extraneous
├── typedarray-to-buffer@ extraneous
├── ua-parser-js@0.7.35 extraneous
├── whatwg-fetch@ extraneous
├── which-pm@ extraneous
├── yaml@ extraneous
└── yocto-queue@ extraneous

Your package.json package.json

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "hexo": {
    "version": "3.9.0"
  },
  "dependencies": {
    "gitalk": "^1.5.2",
    "gulp": "^3.9.1",
    "gulp-mathjax-page": "^1.1.0",
    "hexo": "^3.9.0",
    "hexo-asset-image": "https://github.com/CodeFalling/hexo-asset-image",
    "hexo-cli": "^4.3.1",
    "hexo-deployer-git": "^2.1.0",
    "hexo-footnotes": "^1.0.2",
    "hexo-generator-archive": "^0.1.5",
    "hexo-generator-category": "^0.1.3",
    "hexo-generator-feed": "^2.2.0",
    "hexo-generator-index": "^0.2.1",
    "hexo-generator-searchdb": "^1.0.8",
    "hexo-generator-sitemap": "^2.1.0",
    "hexo-generator-tag": "^0.2.0",
    "hexo-helper-live2d": "^3.1.1",
    "hexo-pdf": "^1.1.1",
    "hexo-related-popular-posts": "^4.0.0",
    "hexo-renderer-ejs": "^0.3.1",
    "hexo-renderer-kramed": "^0.1.4",
    "hexo-renderer-stylus": "^0.3.3",
    "hexo-server": "^0.3.3",
    "hexo-symbols-count-time": "^0.6.1",
    "hexo-tag-aplayer": "^3.0.4",
    "hexo-tag-cloud": "^2.1.1",
    "hexo-wordcount": "^6.0.1"
  }
}

Others

maybe by running this command, I had this error.

$ npm install npm-check                                                                
  ./node_modules/npm-check/bin/cli.js
  npm install npm-upgrade
  ./node_modules/npm-upgrade/lib/bin/cli.js
  npm update --save
stevenjoezhang commented 1 year ago

You're using hexo@3.9.0 which is too old (released 4 years ago). You can try to upgrade hexo and plugins first.

muyuuuu commented 1 year ago

You're using hexo@3.9.0 which is too old (released 4 years ago). You can try to upgrade hexo and plugins first.

I uninstalled hexo and npm and reinstalled them all. Why is the installed hexo an old version of 3.9.0? How to install the latest version hexo ?

muyuuuu commented 1 year ago

thanks, problem was solved.