Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hexo generate ERROR! Script load failed: #5213

Closed
5 tasks done
HumanMus1c opened this issue May 20, 2023 · 2 comments
Closed
5 tasks done

hexo generate ERROR! Script load failed: #5213

HumanMus1c opened this issue May 20, 2023 · 2 comments

Comments

@HumanMus1c
Copy link

HumanMus1c commented May 20, 2023

Check List

Please check followings before submitting a new issue.

Expected behavior

$ hexo s
INFO Validating config
INFO Start processing
INFO Hexo is running at http://localhost:4000/ . Press Ctrl+C to stop.

Actual behavior

$ hexo g
INFO Validating config
ERROR Script load failed: node_modules\hexo-theme-next\scripts\filters\default-injects.js
Error: Cannot find module 'css'
Require stack:

  • D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\utils.js
  • D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\filters\default-injects.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object. (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\utils.js:5:13)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at req (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo\lib\hexo\index.js:292:23)
    at D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\filters\default-injects.js:5:20
    at D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo\lib\hexo\index.js:305:14
    at tryCatcher (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\promise.js:547:31)
    at Promise._settlePromise (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\promise.js:604:18)
    ERROR Script load failed: node_modules\hexo-theme-next\scripts\helpers\engine.js
    Error: Cannot find module 'css'
    Require stack:
  • D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\utils.js
  • D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\helpers\engine.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object. (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\utils.js:5:13)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at req (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo\lib\hexo\index.js:292:23)
    at D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\helpers\engine.js:9:24
    at D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo\lib\hexo\index.js:305:14
    at tryCatcher (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\promise.js:547:31)
    at Promise._settlePromise (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\promise.js:604:18)
    ERROR Script load failed: node_modules\hexo-theme-next\scripts\events\lib\highlight.js
    Error: Cannot find module 'css'
    Require stack:
  • D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\utils.js
  • D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\highlight.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object. (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\utils.js:5:13)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at req (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo\lib\hexo\index.js:292:23)
    at D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\highlight.js:4:37
    at D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo\lib\hexo\index.js:305:14
    at tryCatcher (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\promise.js:547:31)
    at Promise._settlePromise (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\promise.js:604:18)
    ERROR Script load failed: node_modules\hexo-theme-next\scripts\events\lib\injects.js
    Error: Cannot find module 'css'
    Require stack:
  • D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\utils.js
  • D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\injects.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object. (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\utils.js:5:13)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at req (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo\lib\hexo\index.js:292:23)
    at D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\injects.js:5:20
    at D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo\lib\hexo\index.js:305:14
    at tryCatcher (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\promise.js:547:31)
    at Promise._settlePromise (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\promise.js:604:18)
    ERROR Script load failed: node_modules\hexo-theme-next\scripts\events\lib\utils.js
    Error: Cannot find module 'css'
    Require stack:
  • D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\utils.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at req (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo\lib\hexo\index.js:292:23)
    at D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\utils.js:5:13
    at D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo\lib\hexo\index.js:305:14
    at tryCatcher (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\promise.js:547:31)
    at Promise._settlePromise (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\promise.js:604:18)
    at Promise._settlePromise0 (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\promise.js:649:10)
    at Promise._settlePromises (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\promise.js:729:18)
    at _drainQueueStep (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\async.js:93:12)
    at _drainQueue (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\async.js:86:9)
    at Async._drainQueues (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\async.js:102:5)
    at Async.drainQueues [as _onImmediate] (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\async.js:15:14)
    at process.processImmediate (node:internal/timers:476:21)
    ERROR Script load failed: node_modules\hexo-theme-next\scripts\events\lib\vendors.js
    Error: Cannot find module 'css'
    Require stack:
  • D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\utils.js
  • D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\vendors.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object. (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\utils.js:5:13)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at req (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo\lib\hexo\index.js:292:23)
    at D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\vendors.js:7:24
    at D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo\lib\hexo\index.js:305:14
    at tryCatcher (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\promise.js:547:31)
    at Promise._settlePromise (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\bluebird\js\release\promise.js:604:18)
    INFO ==================================
    ███╗ ██╗███████╗██╗ ██╗████████╗
    ████╗ ██║██╔════╝╚██╗██╔╝╚══██╔══╝
    ██╔██╗ ██║█████╗ ╚███╔╝ ██║
    ██║╚██╗██║██╔══╝ ██╔██╗ ██║
    ██║ ╚████║███████╗██╔╝ ██╗ ██║
    ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═╝
    ========================================
    NexT version 8.16.0
    Documentation: https://theme-next.js.org
    ========================================
    INFO Start processing
    FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
    Error: Cannot find module 'css'
    Require stack:
  • D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\utils.js
  • D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\vendors.js
  • D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object. (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\utils.js:5:13)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object. (D:\文档\GitHub\HumanMus1c.github.io\blog\node_modules\hexo-theme-next\scripts\events\lib\vendors.js:7:24)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)

How to reproduce?

  • Step1 hexo c
  • Step2 hexo g

Is the problem still there under "Safe mode"?

Yes.

Environment & Settings

Node.js & npm version(node -v && npm -v)

v18.16.0
9.6.6

Your site _config.yml (Optional)

[_config.yml.txt](https://github.com/hexojs/hexo/files/11522054/_config.yml.txt)

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

hexo-site@0.0.0 D:\文档\GitHub\HumanMus1c.github.io\blog
├── hexo-generator-archive@2.0.0
├── hexo-generator-category@2.0.0
├── hexo-generator-index@3.0.0
├── hexo-generator-tag@2.0.0
├── hexo-renderer-ejs@2.0.0
├── hexo-renderer-marked@6.0.0
├── hexo-renderer-stylus@3.0.0
├── hexo-server@3.0.0
├── hexo-theme-landscape@1.0.0
├── hexo-theme-next@8.16.0
└── hexo@6.3.0

Your package.json package.json

[package.json.txt](https://github.com/hexojs/hexo/files/11522055/package.json.txt)

Others

npm install hexo-theme-next

@mengboy
Copy link

mengboy commented May 21, 2023

install css npm install css

@stevenjoezhang
Copy link
Member

Fixed in next-theme/hexo-theme-next@2d64661
See also stylus/stylus#2709

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants