hexo-theme-yelee icon indicating copy to clipboard operation
hexo-theme-yelee copied to clipboard

ERROR Asset render failed: css/style.css

Open CrazyKidCN opened this issue 6 years ago • 10 comments

报错如下

ERROR Asset render failed: css/style.css CssSyntaxError: /var/www/hexo/themes/yelee2/source/css/style.styl:1076:3: Unknown word at Input.error (/var/www/hexo/node_modules/postcss/lib/input.js:61:21) at Parser.unknownDecl (/var/www/hexo/node_modules/postcss/lib/parser.js:470:26) at Parser.decl (/var/www/hexo/node_modules/postcss/lib/parser.js:227:22) at Parser.word (/var/www/hexo/node_modules/postcss/lib/parser.js:135:30) at Parser.loop (/var/www/hexo/node_modules/postcss/lib/parser.js:60:26) at parse (/var/www/hexo/node_modules/postcss/lib/parse.js:25:12) at new LazyResult (/var/www/hexo/node_modules/postcss/lib/lazy-result.js:57:24) at Processor.process (/var/www/hexo/node_modules/postcss/lib/processor.js:36:16) at Hexo.module.exports (/var/www/hexo/node_modules/hexo-autoprefixer/lib/filter.js:19:49) at Hexo.tryCatcher (/var/www/hexo/node_modules/bluebird/js/release/util.js:16:23) at Hexo. (/var/www/hexo/node_modules/bluebird/js/release/method.js:15:34) at Promise.each.filter (/var/www/hexo/node_modules/hexo/lib/extend/filter.js:63:65) at tryCatcher (/var/www/hexo/node_modules/bluebird/js/release/util.js:16:23) at Object.gotValue (/var/www/hexo/node_modules/bluebird/js/release/reduce.js:155:18) at Object.gotAccum (/var/www/hexo/node_modules/bluebird/js/release/reduce.js:144:25) at Object.tryCatcher (/var/www/hexo/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/var/www/hexo/node_modules/bluebird/js/release/promise.js:512:31) at Promise._settlePromise (/var/www/hexo/node_modules/bluebird/js/release/promise.js:569:18) at Promise._settlePromiseCtx (/var/www/hexo/node_modules/bluebird/js/release/promise.js:606:10) at _drainQueueStep (/var/www/hexo/node_modules/bluebird/js/release/async.js:142:12) at _drainQueue (/var/www/hexo/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/var/www/hexo/node_modules/bluebird/js/release/async.js:147:5) at Immediate.Async.drainQueues [as _onImmediate] (/var/www/hexo/node_modules/bluebird/js/release/async.js:17:14) at processImmediate (timers.js:632:19)

hexo --version

hexo: 3.8.0 hexo-cli: 1.1.0 os: Linux 4.18.18-1.el6.elrepo.x86_64 linux x64 http_parser: 2.8.0 node: 11.2.0 v8: 7.0.276.38-node.11 uv: 1.23.2 zlib: 1.2.11 ares: 1.15.0 modules: 67 nghttp2: 1.34.0 napi: 3 openssl: 1.1.0i icu: 63.1 unicode: 11.0 cldr: 34.0 tz: 2018e

google遍了没找到解决方法.. 试过重装几个renderer没有用,更新hexo也没用..求支招...

CrazyKidCN avatar Nov 28 '18 09:11 CrazyKidCN

还有人遇到吗?求支招...

lettgers avatar Feb 07 '22 10:02 lettgers

啊啊,我研究这个问题一个通宵了!有谁能帮帮我吗!要哭了

ylongwang2782 avatar Mar 25 '22 01:03 ylongwang2782

兄弟,解决了吗

hjl68 avatar May 16 '22 14:05 hjl68

我也遇到了

hjl68 avatar May 16 '22 14:05 hjl68

我也是啊,我还报错//color什么的

bladedevoff avatar Sep 18 '22 03:09 bladedevoff

已经解决了,我用的是butterfly主题,可能和你们的不一样 解决过程:有可能是因为你自定义了主题色,改回去试试

bladedevoff avatar Sep 27 '22 11:09 bladedevoff

主题换回去,然后再改动你需要改动的,亲测有效

ZY19990807 avatar Jun 10 '23 13:06 ZY19990807

检查路径名称里是否存在# @ 等非法字符,可能导致运行错误的字符。

ShiroiTree avatar Oct 14 '23 08:10 ShiroiTree

我也遇到了,问了一下chat GPT,解决了,主要是要创建那个missing file.

Creating a Stylus stylesheet is quite straightforward. In your case, it seems that Hexo is expecting a file named styles.styl in the _data directory. Here are the steps to create an empty styles.styl file:

  • Navigate to the Directory:

Open your terminal or command prompt, and navigate to the _data directory in your Hexo project. Based on the error message, the path is: C:\Users\stell\Desktop\Website\Blog\source\_data in my case.

  • Create the File: Once you are in the correct directory, you can create the styles.styl file. You can do this using a text editor or the echo command on the command line. Here's an example using the command line:
echo "// Empty Stylus file" > styles.styl

This command creates a new file named styles.styl and adds a comment line to it.

  • Verify File Creation:

After running the command, you can check that the file has been created by using a text editor or by listing the files in the directory:

dir  # on Windows

or

ls   # on Linux/Mac

Look for styles.styl in the list of files.

  • Run Hexo: Once the file is created, try running hexo g again:
hexo g

Hexo should now be able to find the styles.styl file, and the error should be resolved.

Remember that this is just a placeholder file, and you may need to add actual Stylus code to it based on your theme's requirements. If the theme expects specific styling in styles.styl, you'll want to customize it accordingly. If you have any further questions or run into issues, feel free to ask!

stellaSalad avatar Jan 22 '24 15:01 stellaSalad

我这边已经解决了,发现是路径名中有'#'造成css资源读取错误。 不过还是谢谢。

获取 Outlook for iOShttps://aka.ms/o0ukef


发件人: stellaSalad @.> 发送时间: Monday, January 22, 2024 11:13:12 PM 收件人: MOxFIVE/hexo-theme-yelee @.> 抄送: ShiroiTree @.>; Comment @.> 主题: Re: [MOxFIVE/hexo-theme-yelee] ERROR Asset render failed: css/style.css (#245)

我也遇到了,问了一下chat GPT,解决了,主要是要创建那个missing file.

Creating a Stylus stylesheet is quite straightforward. In your case, it seems that Hexo is expecting a file named styles.styl in the _data directory. Here are the steps to create an empty styles.styl file:

  • Navigate to the Directory:

Open your terminal or command prompt, and navigate to the _data directory in your Hexo project. Based on the error message, the path is: C:\Users\stell\Desktop\Website\Blog\source_data in my case.

  • Create the File: Once you are in the correct directory, you can create the styles.styl file. You can do this using a text editor or the echo command on the command line. Here's an example using the command line:

echo "// Empty Stylus file" > styles.styl

This command creates a new file named styles.styl and adds a comment line to it.

  • Verify File Creation:

After running the command, you can check that the file has been created by using a text editor or by listing the files in the directory:

dir # on Windows

or

ls # on Linux/Mac

Look for styles.styl in the list of files.

  • Run Hexo: Once the file is created, try running hexo g again:

hexo g

Hexo should now be able to find the styles.styl file, and the error should be resolved.

Remember that this is just a placeholder file, and you may need to add actual Stylus code to it based on your theme's requirements. If the theme expects specific styling in styles.styl, you'll want to customize it accordingly. If you have any further questions or run into issues, feel free to ask!

― Reply to this email directly, view it on GitHubhttps://github.com/MOxFIVE/hexo-theme-yelee/issues/245#issuecomment-1904213365, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BCIOPWEIYIQBQH4TECOYCT3YPZ6YRAVCNFSM4GG4UUE2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJQGQZDCMZTGY2Q. You are receiving this because you commented.Message ID: @.***>

ShiroiTree avatar Jan 24 '24 00:01 ShiroiTree