Closed zyl6698 closed 5 years ago
I certify that I have first consulted (check with "x")
我确认我已经查看了 (选择时请使用 "x" 取代方括号中的空格)
hexo g
hexo s
v8.9.4 6.4.1
{ "name": "hexo-site", "version": "0.0.0", "private": true, "hexo": { "version": "3.8.0" }, "dependencies": { "hexo": "^3.7.0", "hexo-deployer-git": "^0.3.1", "hexo-generator-archive": "^0.1.5", "hexo-generator-category": "^0.1.3", "hexo-generator-index": "^0.2.1", "hexo-generator-tag": "^0.2.0", "hexo-renderer-ejs": "^0.3.1", "hexo-renderer-marked": "^0.3.2", "hexo-renderer-sass": "^0.3.2", "hexo-renderer-stylus": "^0.3.3", "hexo-server": "^0.3.1" } } { "name": "hexo-theme-suka", "version": "0.0.1", "description": "Modern, powerful and simple theme for Hexo", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "setup": "npm cache clean && npm install", "lint": "bash lint.sh" }, "repository": { "type": "git", "url": "git+https://github.com/SukkaW/hexo-theme-suka.git" }, "keywords": [ "hexo", "hexo-theme", "suka", "sukkaw" ], "author": "SukkaW", "license": "GPL-3.0", "bugs": { "url": "https://github.com/SukkaW/hexo-theme-suka/issues" }, "homepage": "https://github.com/SukkaW/hexo-theme-suka#readme", "devDependencies": { "ejs-lint": "^0.3.0", "eslint": "^5.0.1", "gulp": "^4.0.0", "gulp-autoprefixer": "^5.0.0", "gulp-clean-css": "^3.9.4", "gulp-rename": "^1.3.0", "gulp-uglify": "^3.0.0", "sass-lint": "^1.12.1" }, "dependencies": { "json-stringify-safe": "^5.0.1", "node-prismjs": "^0.1.2", "prismjs": "^1.15.0", "qr-image": "^3.2.0" } }
hexo-cli: 1.1.0 os: Darwin 18.0.0 darwin x64 http_parser: 2.7.0 node: 8.9.4 v8: 6.1.534.50 uv: 1.15.0 zlib: 1.2.11 ares: 1.10.1-DEV modules: 57 nghttp2: 1.25.0 openssl: 1.0.2n icu: 59.1 unicode: 9.0 cldr: 31.0.1 tz: 2017b
## Themes: https://hexo.io/themes/ theme: suka suka_theme: search: enable: true path: search.json field: post prism: enable: true line_number: true theme: default
{"name":"hexo","hostname":"zircon.local","pid":86374,"level":60,"err":{"message":"ejs:34\n 32| <% } -%>\n 33| <% if (post._content) { -%>\n >> 34| <% temp_post.content = post.content.replace(new RegExp('<pre(.*?)\\<\\/pre\\>','gs'),'').replace(new RegExp('<[^>]*>','g'),'').replace(new RegExp('\\n','g'),'').replace(new RegExp('<[^>]*>','g'),'').replace(new RegExp('(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]','g'),'') -%>\n 35| <% } -%>\n 36| <% res[index] = temp_post; -%>\n 37| <% index += 1; -%>\n\nInvalid flags supplied to RegExp constructor 'gs'","name":"SyntaxError","stack":"SyntaxError: ejs:34\n 32| <% } -%>\n 33| <% if (post._content) { -%>\n >> 34| <% temp_post.content = post.content.replace(new RegExp('<pre(.*?)\\<\\/pre\\>','gs'),'').replace(new RegExp('<[^>]*>','g'),'').replace(new RegExp('\\n','g'),'').replace(new RegExp('<[^>]*>','g'),'').replace(new RegExp('(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]','g'),'') -%>\n 35| <% } -%>\n 36| <% res[index] = temp_post; -%>\n 37| <% index += 1; -%>\n\nInvalid flags supplied to RegExp constructor 'gs'\n at new RegExp (<anonymous>)\n at eval (eval at compile (/Users/yalv/Sites/geo/themes/suka/node_modules/ejs/lib/ejs.js:524:12), <anonymous>:106:49)\n at Model._Query.Query.Query.forEach (/Users/yalv/Sites/geo/node_modules/warehouse/lib/query.js:42:5)\n at eval (eval at compile (/Users/yalv/Sites/geo/themes/suka/node_modules/ejs/lib/ejs.js:524:12), <anonymous>:16:14)\n at returnedFn (/Users/yalv/Sites/geo/themes/suka/node_modules/ejs/lib/ejs.js:555:17)\n at Hexo.module.exports (/Users/yalv/Sites/geo/themes/suka/scripts/search/json_generator.js:31:16)\n at Hexo.tryCatcher (/Users/yalv/Sites/geo/node_modules/bluebird/js/release/util.js:16:23)\n at Hexo.<anonymous> (/Users/yalv/Sites/geo/node_modules/bluebird/js/release/method.js:15:34)\n at Promise.map.key (/Users/yalv/Sites/geo/node_modules/hexo/lib/hexo/index.js:344:26)\n at tryCatcher (/Users/yalv/Sites/geo/node_modules/bluebird/js/release/util.js:16:23)\n at MappingPromiseArray._promiseFulfilled (/Users/yalv/Sites/geo/node_modules/bluebird/js/release/map.js:61:38)\n at MappingPromiseArray.PromiseArray._iterate (/Users/yalv/Sites/geo/node_modules/bluebird/js/release/promise_array.js:114:31)\n at MappingPromiseArray.init (/Users/yalv/Sites/geo/node_modules/bluebird/js/release/promise_array.js:78:10)\n at MappingPromiseArray._asyncInit (/Users/yalv/Sites/geo/node_modules/bluebird/js/release/map.js:30:10)\n at _drainQueueStep (/Users/yalv/Sites/geo/node_modules/bluebird/js/release/async.js:142:12)\n at _drainQueue (/Users/yalv/Sites/geo/node_modules/bluebird/js/release/async.js:131:9)\n at Async._drainQueues (/Users/yalv/Sites/geo/node_modules/bluebird/js/release/async.js:147:5)\n at Immediate.Async.drainQueues (/Users/yalv/Sites/geo/node_modules/bluebird/js/release/async.js:17:14)\n at runCallback (timers.js:789:20)\n at tryOnImmediate (timers.js:751:5)\n at processImmediate [as _immediateCallback] (timers.js:722:5)"},"msg":"Something's wrong. Maybe you can find the solution here: \u001b[4mhttp://hexo.io/docs/troubleshooting.html\u001b[24m","time":"2018-10-24T12:37:14.645Z","v":0}
MacOS
safari 12.0 (14606.1.36.1.9)
将_config.yml中search改为 false 无报错,怀疑与search相关。
_config.yml
Update node to 9.x or even 10.x then try again?
After updating node to 11.0, it works well. Thanks!
Emmm. So it means that hexo-theme-suka can't run at NodeJS 8.0. I will mention it in README.
I certify that I have first consulted (check with "x")
我确认我已经查看了 (选择时请使用 "x" 取代方括号中的空格)
I'm submitting a (check one with "x")
我正在申请 (选择时请使用 "x" 取代方括号中的空格)
如果你遇到了运行
hexo g
hexo s
时报错If you get error when you are running
hexo s
hexo g
.Node.js and NPM Information
Node.js 和 NPM 的相关信息
v8.9.4 6.4.1
Package dependencies Information
依赖包相关信息
Hexo version
Hexo 版本号
hexo-cli: 1.1.0 os: Darwin 18.0.0 darwin x64 http_parser: 2.7.0 node: 8.9.4 v8: 6.1.534.50 uv: 1.15.0 zlib: 1.2.11 ares: 1.10.1-DEV modules: 57 nghttp2: 1.25.0 openssl: 1.0.2n icu: 59.1 unicode: 9.0 cldr: 31.0.1 tz: 2017b
Hexo & Theme Configuration
站点配置文件和主题配置文件
Error Log
报错日志
如果你在浏览器中发现了问题
If you find something wrong when visiy your blog in browser.
Which device am I using, such as Android, iOS, Windows, Linux, MacOS
我使用的平台,如 Android、iOS、Windows、Linux、MacOS 等
MacOS
Which brows am I using, such as Chrome 58.0.3029.110 (64-bit)
我使用的浏览器(如 Chrome 58.0.3029.110 64 位)
safari 12.0 (14606.1.36.1.9)
Dev Tool - Console.log
开发者面板的控制台日志
What you are expected and what you actually get
预期结果和你的实际结果
将
_config.yml
中search改为 false 无报错,怀疑与search相关。