hexojs / hexo

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

Asset render failed: %s css/style.css #4970

Closed lxx249 closed 2 years ago

lxx249 commented 2 years ago

bug logs

`ERROR { err: OperationalError: D:\code\hexo\test\node_modules\hexo-theme-landscape\source\css\style.styl:90:29 86| @import "_partial/highlight" 87| @import "_partial/mobile" 88| 89| if sidebar 90| @import "_partial/sidebar" -----------------------------------^

failed to locate @import file D:\code\hexo\test\node_modules\stylus\lib\functions\index.styl

  at Evaluator.visitImport (D:\code\hexo\test\node_modules\stylus\lib\visitor\evaluator.js:915:21)
  at Evaluator.Visitor.visit (D:\code\hexo\test\node_modules\stylus\lib\visitor\index.js:28:40)
  at Evaluator.visit (D:\code\hexo\test\node_modules\stylus\lib\visitor\evaluator.js:160:18)
  at Evaluator.visitRoot (D:\code\hexo\test\node_modules\stylus\lib\visitor\evaluator.js:707:27)
  at Evaluator.Visitor.visit (D:\code\hexo\test\node_modules\stylus\lib\visitor\index.js:28:40)
  at Evaluator.visit (D:\code\hexo\test\node_modules\stylus\lib\visitor\evaluator.js:160:18)
  at Evaluator.evaluate (D:\code\hexo\test\node_modules\stylus\lib\visitor\evaluator.js:247:15)
  at Renderer.render (D:\code\hexo\test\node_modules\stylus\lib\renderer.js:86:26)
  at Hexo.stylusFn (D:\code\hexo\test\node_modules\hexo-renderer-stylus\lib\renderer.js:59:6)
  at Hexo.tryCatcher (D:\code\hexo\test\node_modules\bluebird\js\release\util.js:16:23)
  at Hexo.ret (eval at makeNodePromisifiedEval (D:\installation\nodejs\node_global\node_modules\hexo-cli\node_modules\bluebird\js\release\promisify.js:184:12), <anonymous>:13:39)
  at D:\code\hexo\test\node_modules\hexo\lib\hexo\render.js:81:22
  at tryCatcher (D:\code\hexo\test\node_modules\bluebird\js\release\util.js:16:23)
  at Promise._settlePromiseFromHandler (D:\code\hexo\test\node_modules\bluebird\js\release\promise.js:547:31)
  at Promise._settlePromise (D:\code\hexo\test\node_modules\bluebird\js\release\promise.js:604:18)
  at Promise._settlePromise0 (D:\code\hexo\test\node_modules\bluebird\js\release\promise.js:649:10)
  at Promise._settlePromises (D:\code\hexo\test\node_modules\bluebird\js\release\promise.js:729:18)
  at _drainQueueStep (D:\code\hexo\test\node_modules\bluebird\js\release\async.js:93:12)
  at _drainQueue (D:\code\hexo\test\node_modules\bluebird\js\release\async.js:86:9)
  at Async._drainQueues (D:\code\hexo\test\node_modules\bluebird\js\release\async.js:102:5)
  at Immediate.Async.drainQueues [as _onImmediate] (D:\code\hexo\test\node_modules\bluebird\js\release\async.js:15:14)
  at processImmediate (internal/timers.js:464:21) {
cause: Error: D:\code\hexo\test\node_modules\hexo-theme-landscape\source\css\style.styl:90:29
   86| @import "_partial/highlight"
   87| @import "_partial/mobile"
   88|
   89| if sidebar
   90|   @import "_partial/sidebar"
-----------------------------------^

failed to locate @import file D:\code\hexo\test\node_modules\stylus\lib\functions\index.styl

    at Evaluator.visitImport (D:\code\hexo\test\node_modules\stylus\lib\visitor\evaluator.js:915:21)        at Evaluator.Visitor.visit (D:\code\hexo\test\node_modules\stylus\lib\visitor\index.js:28:40)
    at Evaluator.visit (D:\code\hexo\test\node_modules\stylus\lib\visitor\evaluator.js:160:18)
    at Evaluator.visitRoot (D:\code\hexo\test\node_modules\stylus\lib\visitor\evaluator.js:707:27)
    at Evaluator.Visitor.visit (D:\code\hexo\test\node_modules\stylus\lib\visitor\index.js:28:40)
    at Evaluator.visit (D:\code\hexo\test\node_modules\stylus\lib\visitor\evaluator.js:160:18)
    at Evaluator.evaluate (D:\code\hexo\test\node_modules\stylus\lib\visitor\evaluator.js:247:15)
    at Renderer.render (D:\code\hexo\test\node_modules\stylus\lib\renderer.js:86:26)
    at Hexo.stylusFn (D:\code\hexo\test\node_modules\hexo-renderer-stylus\lib\renderer.js:59:6)
    at Hexo.tryCatcher (D:\code\hexo\test\node_modules\bluebird\js\release\util.js:16:23)
    at Hexo.ret (eval at makeNodePromisifiedEval (D:\installation\nodejs\node_global\node_modules\hexo-cli\node_modules\bluebird\js\release\promisify.js:184:12), <anonymous>:13:39)
    at D:\code\hexo\test\node_modules\hexo\lib\hexo\render.js:81:22
    at tryCatcher (D:\code\hexo\test\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (D:\code\hexo\test\node_modules\bluebird\js\release\promise.js:547:31)
    at Promise._settlePromise (D:\code\hexo\test\node_modules\bluebird\js\release\promise.js:604:18)        at Promise._settlePromise0 (D:\code\hexo\test\node_modules\bluebird\js\release\promise.js:649:10)
    at Promise._settlePromises (D:\code\hexo\test\node_modules\bluebird\js\release\promise.js:729:18)
    at _drainQueueStep (D:\code\hexo\test\node_modules\bluebird\js\release\async.js:93:12)
    at _drainQueue (D:\code\hexo\test\node_modules\bluebird\js\release\async.js:86:9)
    at Async._drainQueues (D:\code\hexo\test\node_modules\bluebird\js\release\async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (D:\code\hexo\test\node_modules\bluebird\js\release\async.js:15:14) '\n' +
  '@import "_extend"\n' +
  '@import "_partial/header"\n' +
  '@import "_partial/article"\n' +
  '@import "_partial/comment"\n' +
  '@import "_partial/archive"\n' +
  '@import "_partial/footer"\n' +
  '@import "_partial/highlight"\n' +
  '@import "_partial/mobile"\n' +
  '\n' +
  'if sidebar\n' +
  '  @import "_partial/sidebar"' }}
  Asset render failed: %s css/style.css`

Environment & Settings

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

λ node -v
v14.17.1
λ npm -v
6.14.13

Your package.json package.json

 "hexo": {
    "version": "6.2.0"
  },
  "dependencies": {
    "hexo": "^6.2.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": "^2.0.0",
    "hexo-renderer-marked": "^5.0.0",
    "hexo-renderer-stylus": "^2.0.0",
    "hexo-server": "^3.0.0",
    "hexo-theme-landscape": "^0.0.3"
  }

Others

how to solve it? I can get the HTML text but CSS is lost when the hexo server runs

ajaxsync commented 2 years ago

I also had the same problem

$ node -v
v12.14.0

$ npm -v
6.13.4

$ hexo -v
hexo-cli: 4.3.0
os: win32 10.0.18363
node: 12.14.0
v8: 7.7.299.13-node.16
uv: 1.33.1
zlib: 1.2.11
brotli: 1.0.7
ares: 1.15.0
modules: 72
nghttp2: 1.39.2
napi: 5
llhttp: 1.1.4
http_parser: 2.8.0
openssl: 1.1.1d
cldr: 35.1
icu: 64.2
tz: 2019c
unicode: 12.1
txf-project commented 2 years ago

我也是遇到了同样的问题 image

lxx249 commented 2 years ago

have you solved that bug by degrading the hexo’s version? Can you tell me your right version of hexo and Node? I have tried lots of versions which seems useless!

lxx


From: MeowKing @.> Sent: Saturday, May 14, 2022 8:13:48 PM To: hexojs/hexo @.> Cc: lxx249 @.>; Author @.> Subject: Re: [hexojs/hexo] Asset render failed: %s css/style.css (Issue #4970)

it seems like a bug i tried to degrade my hexo and it worked fine now.

— Reply to this email directly, view it on GitHubhttps://github.com/hexojs/hexo/issues/4970#issuecomment-1126704393, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXAAJRHQF4UGPHZQA4LIJWTVJ6KHZANCNFSM5V5F2IWQ. You are receiving this because you authored the thread.Message ID: @.***>

MHuiG commented 2 years ago

have you solved that bug by degrading the hexo’s version? Can you tell me your right version of hexo and Node? I have tried lots of versions which seems useless! @lxx249

https://github.com/hexojs/hexo/issues/4968#issuecomment-1126828530

Lastaday commented 2 years ago

me too

MeowKing commented 2 years ago

4968

it can be solved by node-glob😋 or using linux

lxx249 commented 2 years ago

4968 it can be solved by node-glob😋 or using linux

Thanks a lot, I have solved it by installing glob@7.2.0

jiaxin310 commented 2 years ago

finally solved😭

LGY07 commented 2 years ago

INFO Validating config INFO Start processing INFO Files loaded in 222 ms ERROR { err: OperationalError: G:\wwwroot\node_modules\hexo-theme-landscape\source\css\style.styl:90:29 86| @import "_partial/highlight" 87| @import "_partial/mobile" 88| 89| if sidebar 90| @import "_partial/sidebar" -----------------------------------^

failed to locate @import file G:\wwwroot\node_modules\stylus\lib\functions\index.styl

  at Evaluator.visitImport (G:\wwwroot\node_modules\stylus\lib\visitor\evaluator.js:915:21)
  ... 20 lines matching cause stack trace ...
  at processImmediate (node:internal/timers:466:21) {
cause: Error: G:\wwwroot\node_modules\hexo-theme-landscape\source\css\style.styl:90:29
   86| @import "_partial/highlight"
   87| @import "_partial/mobile"
   88|
   89| if sidebar
   90|   @import "_partial/sidebar"
-----------------------------------^

failed to locate @import file G:\wwwroot\node_modules\stylus\lib\functions\index.styl

    at Evaluator.visitImport (G:\wwwroot\node_modules\stylus\lib\visitor\evaluator.js:915:21)
    at Evaluator.Visitor.visit (G:\wwwroot\node_modules\stylus\lib\visitor\index.js:28:40)
    at Evaluator.visit (G:\wwwroot\node_modules\stylus\lib\visitor\evaluator.js:160:18)
    at Evaluator.visitRoot (G:\wwwroot\node_modules\stylus\lib\visitor\evaluator.js:707:27)
    at Evaluator.Visitor.visit (G:\wwwroot\node_modules\stylus\lib\visitor\index.js:28:40)
    at Evaluator.visit (G:\wwwroot\node_modules\stylus\lib\visitor\evaluator.js:160:18)
    at Evaluator.evaluate (G:\wwwroot\node_modules\stylus\lib\visitor\evaluator.js:247:15)
    at Renderer.render (G:\wwwroot\node_modules\stylus\lib\renderer.js:86:26)
    at Hexo.stylusFn (G:\wwwroot\node_modules\hexo-renderer-stylus\lib\renderer.js:59:6)
    at Hexo.tryCatcher (G:\wwwroot\node_modules\bluebird\js\release\util.js:16:23)
    at Hexo.ret (eval at makeNodePromisifiedEval (C:\Users\UrsusFeline.UrsusFeline-PC\AppData\Roaming\npm\node_modules\hexo\node_modules\_bluebird@3.7.2@bluebird\js\release\promisify.js:184:12), <anonymous>:13:39)
    at G:\wwwroot\node_modules\hexo\lib\hexo\render.js:81:22
    at tryCatcher (G:\wwwroot\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (G:\wwwroot\node_modules\bluebird\js\release\promise.js:547:31)
    at Promise._settlePromise (G:\wwwroot\node_modules\bluebird\js\release\promise.js:604:18)
    at Promise._settlePromise0 (G:\wwwroot\node_modules\bluebird\js\release\promise.js:649:10)
    at Promise._settlePromises (G:\wwwroot\node_modules\bluebird\js\release\promise.js:729:18)
    at _drainQueueStep (G:\wwwroot\node_modules\bluebird\js\release\async.js:93:12)
    at _drainQueue (G:\wwwroot\node_modules\bluebird\js\release\async.js:86:9)
    at Async._drainQueues (G:\wwwroot\node_modules\bluebird\js\release\async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (G:\wwwroot\node_modules\bluebird\js\release\async.js:15:14)
    at processImmediate (node:internal/timers:466:21) {
  lineno: 90,
  column: 29,
  filename: 'G:\\wwwroot\\node_modules\\hexo-theme-landscape\\source\\css\\style.styl',
  stylusStack: '',
  input: '@import "nib"\n' +
    '@import "_variables"\n' +
    '@import "_util/mixin"\n' +
    '@import "_util/grid"\n' +
    '\n' +
    'global-reset()\n' +
    '\n' +
    'input, button\n' +
    '  margin: 0\n' +
    '  padding: 0\n' +
    '  &::-moz-focus-inner\n' +
    '    border: 0\n' +
    '    padding: 0\n' +
    '\n' +
    '@font-face\n' +
    '  font-family: FontAwesome\n' +
    '  font-style: normal\n' +
    '  font-weight: normal\n' +
    '  src: url(font-icon-path + ".eot?v=" + font-icon-version)\n' +
    '  src: url(font-icon-path + ".eot?#iefix&v=" + font-icon-version) format("embedded-opentype"),\n' +
    '       url(font-icon-path + ".woff2?v=" + font-icon-version) format("woff2"),\n' +
    '       url(font-icon-path + ".woff?v=" + font-icon-version) format("woff"),\n' +
    '       url(font-icon-path + ".ttf?v=" + font-icon-version) format("truetype"),\n' +
    '       url(font-icon-path + ".svg?v=" + font-icon-version + "#fontawesomeregular") format("svg")\n' +
    '\n' +
    'html, body, #container\n' +
    '  height: 100%\n' +
    '\n' +
    'body\n' +
    '  background: color-background\n' +
    '  font: font-size font-sans\n' +
    '  -webkit-text-size-adjust: 100%\n' +
    '\n' +
    '.outer\n' +
    '  clearfix()\n' +
    '  max-width: (column-width + gutter-width) * columns + gutter-width\n' +
    '  margin: 0 auto\n' +
    '  padding: 0 gutter-width\n' +
    '\n' +
    '.inner\n' +
    '  column(columns)\n' +
    '\n' +
    '.left, .alignleft\n' +
    '  float: left\n' +
    '\n' +
    '.right, .alignright\n' +
    '  float: right\n' +
    '\n' +
    '.clear\n' +
    '  clear: both\n' +
    '\n' +
    '#container\n' +
    '  position: relative\n' +
    '\n' +
    '.mobile-nav-on\n' +
    '  overflow: hidden\n' +
    '\n' +
    '#wrap\n' +
    '  height: 100%\n' +
    '  width: 100%\n' +
    '  position: absolute\n' +
    '  top: 0\n' +
    '  left: 0\n' +
    '  transition: 0.2s ease-out\n' +
    '  z-index: 1\n' +
    '  background: color-background\n' +
    '  .mobile-nav-on &\n' +
    '    left: mobile-nav-width\n' +
    '\n' +
    'if sidebar and sidebar isnt bottom\n' +
    '  #main\n' +
    '    @media mq-normal\n' +
    '      column(main-column)\n' +
    '\n' +
    'if sidebar is left\n' +
    '  @media mq-normal\n' +
    '    #main\n' +
    '      float: right\n' +
    '\n' +
    '@import "_extend"\n' +
    '@import "_partial/header"\n' +
    '@import "_partial/article"\n' +
    '@import "_partial/comment"\n' +
    '@import "_partial/archive"\n' +
    '@import "_partial/footer"\n' +
    '@import "_partial/highlight"\n' +
    '@import "_partial/mobile"\n' +
    '\n' +
    'if sidebar\n' +
    '  @import "_partial/sidebar"'
},
isOperational: true,
lineno: 90,
column: 29,
filename: 'G:\\wwwroot\\node_modules\\hexo-theme-landscape\\source\\css\\style.styl',
stylusStack: '',
input: '@import "nib"\n' +
  '@import "_variables"\n' +
  '@import "_util/mixin"\n' +
  '@import "_util/grid"\n' +
  '\n' +
  'global-reset()\n' +
  '\n' +
  'input, button\n' +
  '  margin: 0\n' +
  '  padding: 0\n' +
  '  &::-moz-focus-inner\n' +
  '    border: 0\n' +
  '    padding: 0\n' +
  '\n' +
  '@font-face\n' +
  '  font-family: FontAwesome\n' +
  '  font-style: normal\n' +
  '  font-weight: normal\n' +
  '  src: url(font-icon-path + ".eot?v=" + font-icon-version)\n' +
  '  src: url(font-icon-path + ".eot?#iefix&v=" + font-icon-version) format("embedded-opentype"),\n' +
  '       url(font-icon-path + ".woff2?v=" + font-icon-version) format("woff2"),\n' +
  '       url(font-icon-path + ".woff?v=" + font-icon-version) format("woff"),\n' +
  '       url(font-icon-path + ".ttf?v=" + font-icon-version) format("truetype"),\n' +
  '       url(font-icon-path + ".svg?v=" + font-icon-version + "#fontawesomeregular") format("svg")\n' +
  '\n' +
  'html, body, #container\n' +
  '  height: 100%\n' +
  '\n' +
  'body\n' +
  '  background: color-background\n' +
  '  font: font-size font-sans\n' +
  '  -webkit-text-size-adjust: 100%\n' +
  '\n' +
  '.outer\n' +
  '  clearfix()\n' +
  '  max-width: (column-width + gutter-width) * columns + gutter-width\n' +
  '  margin: 0 auto\n' +
  '  padding: 0 gutter-width\n' +
  '\n' +
  '.inner\n' +
  '  column(columns)\n' +
  '\n' +
  '.left, .alignleft\n' +
  '  float: left\n' +
  '\n' +
  '.right, .alignright\n' +
  '  float: right\n' +
  '\n' +
  '.clear\n' +
  '  clear: both\n' +
  '\n' +
  '#container\n' +
  '  position: relative\n' +
  '\n' +
  '.mobile-nav-on\n' +
  '  overflow: hidden\n' +
  '\n' +
  '#wrap\n' +
  '  height: 100%\n' +
  '  width: 100%\n' +
  '  position: absolute\n' +
  '  top: 0\n' +
  '  left: 0\n' +
  '  transition: 0.2s ease-out\n' +
  '  z-index: 1\n' +
  '  background: color-background\n' +
  '  .mobile-nav-on &\n' +
  '    left: mobile-nav-width\n' +
  '\n' +
  'if sidebar and sidebar isnt bottom\n' +
  '  #main\n' +
  '    @media mq-normal\n' +
  '      column(main-column)\n' +
  '\n' +
  'if sidebar is left\n' +
  '  @media mq-normal\n' +
  '    #main\n' +
  '      float: right\n' +
  '\n' +
  '@import "_extend"\n' +
  '@import "_partial/header"\n' +
  '@import "_partial/article"\n' +
  '@import "_partial/comment"\n' +
  '@import "_partial/archive"\n' +
  '@import "_partial/footer"\n' +
  '@import "_partial/highlight"\n' +
  '@import "_partial/mobile"\n' +
  '\n' +
  'if sidebar\n' +
  '  @import "_partial/sidebar"'

} } Asset render failed: %s css/style.css (node:12164) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) (node:12164) Warning: Accessing non-existent property 'column' of module exports inside circular dependency (node:12164) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency (node:12164) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency (node:12164) Warning: Accessing non-existent property 'column' of module exports inside circular dependency (node:12164) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency INFO Generated: archives/index.html INFO Generated: archives/2022/05/index.html INFO Generated: archives/2022/index.html INFO Generated: index.html INFO Generated: fancybox/jquery.fancybox.min.css INFO Generated: js/script.js INFO Generated: css/fonts/FontAwesome.otf INFO Generated: css/style.css INFO Generated: fancybox/jquery.fancybox.min.js INFO Generated: js/jquery-3.4.1.min.js INFO Generated: css/images/banner.jpg INFO Generated: css/fonts/fontawesome-webfont.eot INFO Generated: css/fonts/fontawesome-webfont.ttf INFO Generated: css/fonts/fontawesome-webfont.woff2 INFO Generated: 2022/05/15/hello-world/index.html INFO Generated: css/fonts/fontawesome-webfont.woff INFO Generated: css/fonts/fontawesome-webfont.svg INFO 17 files generated in 739 ms

MHuiG commented 2 years ago

@LGY07 不要发异常了,邮箱快满了 🤣

see heer: https://github.com/isaacs/node-glob/issues/471#issuecomment-1126739067

Lastaday commented 2 years ago

4968 it can be solved by node-glob😋 or using linux

Thanks a lot, I have solved it by installing glob@7.2.0

npm i glob@7.2.0 can be solved? I try it but failed.Help me

YuriSizuku commented 2 years ago

I also have this problem when using hexo v6.2 and butterfly theme v4.2. Here the error log.

$ hexo s
INFO  Validating config
INFO
  ===================================================================

      #####  #    # ##### ##### ###### #####  ###### #      #   #
      #    # #    #   #     #   #      #    # #      #       # #
      #####  #    #   #     #   #####  #    # #####  #        #
      #    # #    #   #     #   #      #####  #      #        #
      #    # #    #   #     #   #      #   #  #      #        #
      #####   ####    #     #   ###### #    # #      ######   #

                            4.2.1
  ===================================================================
INFO  Start processing
INFO  Generating urls for last 20 posts
INFO  Posts urls generated in submit_urls.txt
https://blog.schnee.moe/posts/MemoryModule/
https://blog.schnee.moe/posts/Q-bit_chs/
https://blog.schnee.moe/posts/flowers1_psv_chs/
https://blog.schnee.moe/posts/flowers3_psv_chs/
https://blog.schnee.moe/posts/flowers2_psv_chs/
https://blog.schnee.moe/posts/GalgameReverse_special1/
https://blog.schnee.moe/posts/GalgameReverse6/
https://blog.schnee.moe/posts/yokohama_hanabi/
https://blog.schnee.moe/posts/SimpleDpack/
https://blog.schnee.moe/posts/Nogizaka_MejijinguGaien/
https://blog.schnee.moe/posts/hokkaido(extra)_tokyo/
https://blog.schnee.moe/posts/hokkaido10_hakodate_aomori/
https://blog.schnee.moe/posts/hokkaido9_otaru/
https://blog.schnee.moe/posts/hokkaido7_noboribetsu_toya/
https://blog.schnee.moe/posts/hokkaido8_wakkanai/
https://blog.schnee.moe/posts/hokkaido6_kouhuku/
https://blog.schnee.moe/posts/hokkaido5_nemuro/
https://blog.schnee.moe/posts/hokkaido4_senmohonsen/
https://blog.schnee.moe/posts/hokkaido3_poppoya/
https://blog.schnee.moe/posts/hokkaido1_sapporo/
INFO  Hexo is running at http://localhost:4000/ . Press Ctrl+C to stop.
ERROR {
  err: OperationalError: D:\Make\Proc\github\YuriSizukuBlog\node_modules\hexo-theme-butterfly\source\css\index.styl:21:33
     17|   @import '_search/algolia'
     18|
     19| if hexo-config('local_search') && hexo-config('local_search.enable')
     20|   @import '_search/index'
     21|   @import '_search/local-search'
  ---------------------------------------^
     22|

  failed to locate @import file D:\Make\Proc\github\YuriSizukuBlog\node_modules\stylus\lib\functions\index.styl

      at Evaluator.visitImport (D:\Make\Proc\github\YuriSizukuBlog\node_modules\stylus\lib\visitor\evaluator.js:915:21)
      at Evaluator.Visitor.visit (D:\Make\Proc\github\YuriSizukuBlog\node_modules\stylus\lib\visitor\index.js:28:40)
      at Evaluator.visit (D:\Make\Proc\github\YuriSizukuBlog\node_modules\stylus\lib\visitor\evaluator.js:160:18)
      at Evaluator.visitRoot (D:\Make\Proc\github\YuriSizukuBlog\node_modules\stylus\lib\visitor\evaluator.js:707:27)
      at Evaluator.Visitor.visit (D:\Make\Proc\github\YuriSizukuBlog\node_modules\stylus\lib\visitor\index.js:28:40)
      at Evaluator.visit (D:\Make\Proc\github\YuriSizukuBlog\node_modules\stylus\lib\visitor\evaluator.js:160:18)
      at Evaluator.evaluate (D:\Make\Proc\github\YuriSizukuBlog\node_modules\stylus\lib\visitor\evaluator.js:247:15)
      at Renderer.render (D:\Make\Proc\github\YuriSizukuBlog\node_modules\stylus\lib\renderer.js:86:26)
      at Hexo.stylusFn (D:\Make\Proc\github\YuriSizukuBlog\node_modules\hexo-renderer-stylus\lib\renderer.js:59:6)
      at Hexo.tryCatcher (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\util.js:16:23)
      at Hexo.ret (eval at makeNodePromisifiedEval (C:\Users\yurisizuku\AppData\Roaming\npm\node_modules\hexo-cli\node_modules\bluebird\js\release\promisify.js:184:12), <anonymous>:13:39)
      at D:\Make\Proc\github\YuriSizukuBlog\node_modules\hexo\lib\hexo\render.js:81:22
      at tryCatcher (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\util.js:16:23)
      at Promise._settlePromiseFromHandler (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\promise.js:547:31)
      at Promise._settlePromise (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\promise.js:604:18)
      at Promise._settlePromise0 (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\promise.js:649:10)
      at Promise._settlePromises (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\promise.js:729:18)
      at _drainQueueStep (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\async.js:93:12)
      at _drainQueue (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\async.js:86:9)
      at Async._drainQueues (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\async.js:102:5)
      at Immediate.Async.drainQueues [as _onImmediate] (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\async.js:15:14)
      at processImmediate (internal/timers.js:464:21) {
    cause: Error: D:\Make\Proc\github\YuriSizukuBlog\node_modules\hexo-theme-butterfly\source\css\index.styl:21:33
       17|   @import '_search/algolia'
       18|
       19| if hexo-config('local_search') && hexo-config('local_search.enable')
       20|   @import '_search/index'
       21|   @import '_search/local-search'
    ---------------------------------------^
       22|

    failed to locate @import file D:\Make\Proc\github\YuriSizukuBlog\node_modules\stylus\lib\functions\index.styl

        at Evaluator.visitImport (D:\Make\Proc\github\YuriSizukuBlog\node_modules\stylus\lib\visitor\evaluator.js:915:21)
        at Evaluator.Visitor.visit (D:\Make\Proc\github\YuriSizukuBlog\node_modules\stylus\lib\visitor\index.js:28:40)
        at Evaluator.visit (D:\Make\Proc\github\YuriSizukuBlog\node_modules\stylus\lib\visitor\evaluator.js:160:18)
        at Evaluator.visitRoot (D:\Make\Proc\github\YuriSizukuBlog\node_modules\stylus\lib\visitor\evaluator.js:707:27)
        at Evaluator.Visitor.visit (D:\Make\Proc\github\YuriSizukuBlog\node_modules\stylus\lib\visitor\index.js:28:40)
        at Evaluator.visit (D:\Make\Proc\github\YuriSizukuBlog\node_modules\stylus\lib\visitor\evaluator.js:160:18)
        at Evaluator.evaluate (D:\Make\Proc\github\YuriSizukuBlog\node_modules\stylus\lib\visitor\evaluator.js:247:15)
        at Renderer.render (D:\Make\Proc\github\YuriSizukuBlog\node_modules\stylus\lib\renderer.js:86:26)
        at Hexo.stylusFn (D:\Make\Proc\github\YuriSizukuBlog\node_modules\hexo-renderer-stylus\lib\renderer.js:59:6)
        at Hexo.tryCatcher (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\util.js:16:23)
        at Hexo.ret (eval at makeNodePromisifiedEval (C:\Users\yurisizuku\AppData\Roaming\npm\node_modules\hexo-cli\node_modules\bluebird\js\release\promisify.js:184:12), <anonymous>:13:39)
        at D:\Make\Proc\github\YuriSizukuBlog\node_modules\hexo\lib\hexo\render.js:81:22
        at tryCatcher (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\util.js:16:23)
        at Promise._settlePromiseFromHandler (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\promise.js:547:31)
        at Promise._settlePromise (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\promise.js:604:18)
        at Promise._settlePromise0 (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\promise.js:649:10)
        at Promise._settlePromises (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\promise.js:729:18)
        at _drainQueueStep (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\async.js:93:12)
        at _drainQueue (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\async.js:86:9)
        at Async._drainQueues (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\async.js:102:5)
        at Immediate.Async.drainQueues [as _onImmediate] (D:\Make\Proc\github\YuriSizukuBlog\node_modules\bluebird\js\release\async.js:15:14)
        at processImmediate (internal/timers.js:464:21) {
      lineno: 21,
      column: 33,
      filename: 'D:\\Make\\Proc\\github\\YuriSizukuBlog\\node_modules\\hexo-theme-butterfly\\source\\css\\index.styl',
      stylusStack: '',
      input: "if hexo-config('css_prefix')\n" +
        "  @import 'nib'\n" +
        '\n' +
        "@import '_third-party/normalize.min.css'\n" +
        '// project\n' +
        "@import 'var'\n" +
        "@import '_global/*'\n" +
        "@import '_highlight/highlight'\n" +
        "@import '_page/*'\n" +
        "@import '_layout/*'\n" +
        "@import '_tags/*'\n" +
        "@import '_mode/*'\n" +
        '\n' +
        '// search\n' +
        "if hexo-config('algolia_search.enable')\n" +
        "  @import '_search/index'\n" +
        "  @import '_search/algolia'\n" +
        '\n' +
        "if hexo-config('local_search') && hexo-config('local_search.enable')\n" +
        "  @import '_search/index'\n" +
        "  @import '_search/local-search'\n"
    },
    isOperational: true,
    lineno: 21,
    column: 33,
    filename: 'D:\\Make\\Proc\\github\\YuriSizukuBlog\\node_modules\\hexo-theme-butterfly\\source\\css\\index.styl',
    stylusStack: '',
    input: "if hexo-config('css_prefix')\n" +
      "  @import 'nib'\n" +
      '\n' +
      "@import '_third-party/normalize.min.css'\n" +
      '// project\n' +
      "@import 'var'\n" +
      "@import '_global/*'\n" +
      "@import '_highlight/highlight'\n" +
      "@import '_page/*'\n" +
      "@import '_layout/*'\n" +
      "@import '_tags/*'\n" +
      "@import '_mode/*'\n" +
      '\n' +
      '// search\n' +
      "if hexo-config('algolia_search.enable')\n" +
      "  @import '_search/index'\n" +
      "  @import '_search/algolia'\n" +
      '\n' +
      "if hexo-config('local_search') && hexo-config('local_search.enable')\n" +
      "  @import '_search/index'\n" +
      "  @import '_search/local-search'\n"
  }
} Asset render failed: %s css/index.css
(node:18500) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:18500) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:18500) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:18500) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:18500) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:18500) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
ajaxsync commented 2 years ago

4968可以通过 node-glob 解决😋或者使用linux

非常感谢,我已经通过安装 glob@7.2.0 解决了

npm i glob@7.2.0 可以解决吗?我尝试了但失败了。

我刚才尝试重新初始化新的项目,并尝试安装了 npm i glob@7.2.0 但是问题依旧存在,页面样式还是不正确的。

YuriSizuku commented 2 years ago

npm i glob@7.2.0

我用这个也不行,你是怎么解决的?

MHuiG commented 2 years ago

node16 npm8 修改 package.json https://github.com/volantis-x/demo/blob/5063cebe42975af229aea88fbcc0e25fa1cc3048/package.json#L14-L19 (顺便解释一下 glob 是用来处理本issues异常; nib 用来处理一个 Warning https://github.com/volantis-x/hexo-theme-volantis/discussions/738) 删除 package-lock.json node_modules 然后 执行安装命令

npm i

(安装glob只是执行了npm i,并没有什么用,如果安装了建议马上卸载 npm un glob)

https://github.com/hexojs/hexo/issues/4968

https://github.com/isaacs/node-glob/issues/471

MHuiG commented 2 years ago

实在不行,就尝试跑一下volantis的demo

git clone https://github.com/volantis-x/demo.git && cd demo && npm i && hexo s
MHuiG commented 2 years ago

如果还不行就 回滚之前的操作 放弃Windows,使用Linux🤣

YuriSizuku commented 2 years ago

实在不行,就尝试跑一下volantis的demo

git clone https://github.com/volantis-x/demo.git && cd demo && npm i && hexo s

多谢了,跑这个demo成功了。但是到我博客的项目加入后会报错,请问这种情况怎么解决?

$ npm i --force
npm WARN using --force Recommended protections disabled.
npm ERR! code EOVERRIDE
npm ERR! Override for glob@^7.2.0 conflicts with direct dependency

下面是配置文件

{
   "name": "hexo-site",
   "version": "0.0.0",
   "private": true,
   "scripts": {
      "build": "hexo generate",
      "clean": "hexo clean",
      "deploy": "hexo deploy",
      "server": "hexo server"
   },
   "hexo": {
      "version": "6.2.0"
   },
   "dependencies": {
      "glob": "^7.2.0",
      "hexo": "^6.2.0",
      "hexo-abbrlink": "^2.2.1",
      "hexo-asset-link": "^2.1.1",
      "hexo-blog-encrypt": "^3.1.6",
      "hexo-deployer-sftp": "^0.4.1",
      "hexo-filter-nofollow": "^2.0.2",
      "hexo-generator-archive": "^1.0.0",
      "hexo-generator-baidu-sitemap": "^0.1.9",
      "hexo-generator-category": "^1.0.0",
      "hexo-generator-index": "^2.0.0",
      "hexo-generator-search": "^2.4.3",
      "hexo-generator-seo-friendly-sitemap": "^0.2.1",
      "hexo-generator-tag": "^1.0.0",
      "hexo-hide-posts": "^0.2.0",
      "hexo-myadmin": "^0.5.0",
      "hexo-renderer-ejs": "^2.0.0",
      "hexo-renderer-marked": "^5.0.0",
      "hexo-renderer-pug": "^3.0.0",
      "hexo-renderer-stylus": "^2.0.1",
      "hexo-server": "^3.0.0",
      "hexo-submit-urls-to-search-engine": "^2.1.0",
      "hexo-theme-butterfly": "^4.2.1",
      "hexo-wordcount": "^6.0.1",
      "install": "^0.13.0"
   },
  "overrides": {
    "nib": {
      "stylus": "0.54.8"
    },
    "glob": "7.2.0"
  }
}
MHuiG commented 2 years ago

但是到我博客的项目加入后会报错,请问这种情况怎么解决?

换Linux吧🤣

ajaxsync commented 2 years ago

是的,windows有问题,使用linux没有问题

iwyang commented 2 years ago

怎么解决的

ajaxsync commented 2 years ago

没解决 换Liunx

MHuiG commented 2 years ago

不要浪费时间了,直接换Liunx

iwyang commented 2 years ago

不要浪费时间了,直接换Liunx

用楼上你的方法解决了么

MHuiG commented 2 years ago

用楼上你的方法解决了么

git clone https://github.com/volantis-x/demo.git && cd demo && npm i && hexo s
lxx249 commented 2 years ago

4968 it can be solved by node-glob😋 or using linux

Thanks a lot, I have solved it by installing glob@7.2.0

npm i glob@7.2.0 can be solved? I try it but failed.Help me

try to re-install hexo and init new blog_demo , npm i glob@7.2.0 it works for me my env setting is (for reference) : node -v v16.14.0 npm -v 8.10.0 hexo version INFO Validating config hexo: 6.2.0 hexo-cli: 4.3.0 os: win32 10.0.19044 node: 16.14.0 code: hexo init demo && cd demo && npm i glob@7.2.0 && hexo g && hexo s Finally works hexo s INFO Validating config INFO Start processing INFO Hexo is running at http://localhost:4000/ . Press Ctrl+C to stop.

damomoda commented 2 years ago

tks ,overwrite is worked!

KuramiWan commented 2 years ago
$ node -v
v16.13.0

$ npm -v
8.1.0

$ hexo -v
hexo: 6.2.0
hexo-cli: 4.3.0
os: win32 10.0.19044
node: 16.13.0
v8: 9.4.146.19-node.13
uv: 1.42.0
zlib: 1.2.11
brotli: 1.0.9
ares: 1.17.2
modules: 93
nghttp2: 1.45.1
napi: 8
llhttp: 6.0.4
openssl: 1.1.1l+quic
cldr: 39.0
icu: 69.1
tz: 2021a
unicode: 13.0
ngtcp2: 0.1.0-DEV
nghttp3: 0.1.0-DEV

I use npm i glob@7.2.0 Fix it

isaacs commented 2 years ago

Should be fixed by glob@7.2.3. If it isn't, please post a new issue at https://github.com/isaacs/node-glob/issues, ideally with a reproduction case. Thanks!

sigpending commented 2 years ago

npm i glob@7.2.0 我用这个方式解决了。