Open opfanswyx opened 3 years ago
同样的问题,windows 10环境
hey~ @JamesHoi 在朋友@sugejie 的帮助下,可以正常生成该blog,但是具体问题和原因,尚不清楚,希望看到这个问题的author们可以关注一下。
和朋友互换了node_modules目录后,发现他使用我的node_modules就无法生成了,我换了他的node_modules就能正常生成了,我的版本比较新,问题应该在nodemodules里面,可能是在较新的依赖环境里存在不兼容的问题了,“ is not defined”报错应该和https://www.lodashjs.com/这个东西有关。但是不懂前端,不知道具体原因,希望author能关心一下这个问题,毕竟出现了功能上的失败。
如果你也需要node_modules,请联系我。
hey~ @JamesHoi 在朋友@sugejie 的帮助下,可以正常生成该blog,但是具体问题和原因,尚不清楚,希望看到这个问题的author们可以关注一下。
和朋友互换了node_modules目录后,发现他使用我的node_modules就无法生成了,我换了他的node_modules就能正常生成了,我的版本比较新,问题应该在nodemodules里面,可能是在较新的依赖环境里存在不兼容的问题了,“ is not defined”报错应该和https://www.lodashjs.com/这个东西有关。但是不懂前端,不知道具体原因,希望author能关心一下这个问题,毕竟出现了功能上的失败。
如果你也需要node_modules,请联系我。
@opfanswyx 非常感谢,我也发现了是这个的问题,但不懂前端,那你方便的话能否发到jameshoi@foxmail.com这个邮箱呢
hey~ @JamesHoi 在朋友@sugejie 的帮助下,可以正常生成该blog,但是具体问题和原因,尚不清楚,希望看到这个问题的author们可以关注一下。 和朋友互换了node_modules目录后,发现他使用我的node_modules就无法生成了,我换了他的node_modules就能正常生成了,我的版本比较新,问题应该在nodemodules里面,可能是在较新的依赖环境里存在不兼容的问题了,“ is not defined”报错应该和https://www.lodashjs.com/这个东西有关。但是不懂前端,不知道具体原因,希望author能关心一下这个问题,毕竟出现了功能上的失败。 如果你也需要node_modules,请联系我。
我也出现了同样的问题,能否分享你的 node_modules 到 brucehan1998@outlook.com ,十分感谢!
我使用@opfanswyx的node_modules还是无法生成
参照 https://github.com/hexojs/hexo/issues/3753
Global Variables
中_
已被移除(
参照 hexojs/hexo#3753
Global Variables
中_
已被移除(
根据你的思路,我找到hexo的提交历史 参照提交历史,修改以下文件并执行命令即可修复
"lodash": "4.17.20"
添加后的文件如下:
…
"_phantomChildren": {
"abbrev": "1.1.1",
"bluebird": "3.7.2",
"chalk": "4.1.0",
"command-exists": "1.2.9",
"hexo-fs": "3.1.0",
"hexo-log": "2.0.0",
"hexo-util": "2.4.0",
"minimist": "1.2.5",
"resolve": "1.18.1",
"tildify": "2.0.0",
"lodash": "4.17.20"
},
…和
this. = ;`
添加后的文件如下:
…const Promise = require('bluebird'); const { sep, join, dirname } = require('path'); const tildify = require('tildify'); const Database = require('warehouse'); const { magenta, underline } = require('chalk'); const { EventEmitter } = require('events'); const { readFile } = require('hexo-fs'); const Module = require('module'); const { runInThisContext } = require('vm'); const { version } = require('../../package.json'); const logger = require('hexo-log'); const { Console, Deployer, Filter, Generator, Helper, Injector, Migrator, Processor, Renderer, Tag } = require('../extend'); const Render = require('./render'); const registerModels = require('./register_models'); const Post = require('./post'); const Scaffold = require('./scaffold'); const Source = require('./source'); const Router = require('./router'); const Theme = require('../theme'); const Locals = require('./locals'); const defaultConfig = require('./default_config'); const loadDatabase = require('./load_database'); const multiConfigPath = require('./multi_config_path'); const { sync } = require('resolve'); const { deepMerge, full_urlfor } = require('hexo-util'); const = require('lodash'); …
class Locals { constructor(path, locals) { this.page = { ...locals }; if (this.page.path == null) this.page.path = path; this.path = path; this.url = full_urlfor.call(ctx, path); this.config = config; this.theme = theme.config; this.layout = 'layout'; this.env = env; this. = _; this.view_dir = join(theme_dir, 'layout') + sep; this.site = localsObj; } …
参照hexojs / HEXO#3753
Global Variables
中_
已被移除移除(根据你的思路,我找到hexo的提交历史参照 提交历史,修改以下文件并执行命令即可恢复
- 在博客目录下执行npm install lodash
- 在[BlogPath] /node_modules/hexo/package.json中
"lodash": "4.17.20"
添加添加后的文件如下: … “ _phantomChildren”:{ “ abbrev”:“ 1.1.1”, “ bluebird”:“ 3.7.2”, “ chalk” :“ 4.1.0”, “ command-exists”:“ 1.2.9”, “ hexo-fs”:“ 3.1.0”, “ hexo-log”:“ 2.0.0”, “ hexo-util”:“ 2.4.0“, ” minimist“:” 1.2.5“, ” resolve“:” 1.18.1“, ” tildify“:” 2.0.0“, ” lodash“:” 4.17.20“ }, …- 在[BlogPath] /nodemodules/hexo/lib/hexo/index.js加上`const = require("lodash");
和
this. = ;` 添加后的文件如下: …const Promise = require('bluebird'); const {sep,join,dirname} = require('path'); const tildify = require('tildify'); const数据库= require('仓库'); const {洋红色,下划线} = require('chalk'); const {EventEmitter} = require('events'); const {readFile} = require('hexo-fs'); const Module = require('module'); const {runInThisContext} = require('vm'); const {version} = require('../../ package.json'); const logger = require('hexo-log'); const {Console,Deployer,Filter,Generator,Helper,Injector,Migrator,Processor,Renderer,Tag} = require('../ extend'); const Render = require('。/ render'); const registerModels = require('./ register_models'); const Post = require('./ post'); const Scaffold = require('./ scaffold'); const Source = require('./ source'); const Router = require('./ router'); const Theme = require('../ theme'); const Locals = require('./ locals'); const defaultConfig = require('./ default_config'); const loadDatabase = require('./ load_database'); const multiConfigPath = require('./ multi_config_path'); const {sync} = require('resolve'); const {deepMerge,full_urlfor} = require('hexo-util'); const = require('lodash'); …
类Locals { 构造函数(路径,locals){ this.page = {... locals}; 如果(this.page.path == null)this.page.path =路径; this.path =路径; this.url = full_urlfor.call(ctx,path); this.config =配置; this.theme = theme.config; this.layout ='layout'; this.env = env; = _; this.view_dir = join(theme_dir,'layout')+ sep; this.site = localsObj; } …
完美的解决了问题
参照 hexojs/hexo#3753
Global Variables
中_
已被移除(根据你的思路,我找到hexo的提交历史 参照提交历史,修改以下文件并执行命令即可修复
- 在博客目录下执行 npm install lodash
- 在[BlogPath]/node_modules/hexo/package.json 中加上
"lodash": "4.17.20"
添加后的文件如下: … "_phantomChildren": { "abbrev": "1.1.1", "bluebird": "3.7.2", "chalk": "4.1.0", "command-exists": "1.2.9", "hexo-fs": "3.1.0", "hexo-log": "2.0.0", "hexo-util": "2.4.0", "minimist": "1.2.5", "resolve": "1.18.1", "tildify": "2.0.0", "lodash": "4.17.20" }, …- 在[BlogPath]/nodemodules/hexo/lib/hexo/index.js 加上`const = require("lodash");
和
this. = ;` 添加后的文件如下: …const Promise = require('bluebird'); const { sep, join, dirname } = require('path'); const tildify = require('tildify'); const Database = require('warehouse'); const { magenta, underline } = require('chalk'); const { EventEmitter } = require('events'); const { readFile } = require('hexo-fs'); const Module = require('module'); const { runInThisContext } = require('vm'); const { version } = require('../../package.json'); const logger = require('hexo-log'); const { Console, Deployer, Filter, Generator, Helper, Injector, Migrator, Processor, Renderer, Tag } = require('../extend'); const Render = require('./render'); const registerModels = require('./register_models'); const Post = require('./post'); const Scaffold = require('./scaffold'); const Source = require('./source'); const Router = require('./router'); const Theme = require('../theme'); const Locals = require('./locals'); const defaultConfig = require('./default_config'); const loadDatabase = require('./load_database'); const multiConfigPath = require('./multi_config_path'); const { sync } = require('resolve'); const { deepMerge, full_urlfor } = require('hexo-util'); const = require('lodash'); …
class Locals { constructor(path, locals) { this.page = { ...locals }; if (this.page.path == null) this.page.path = path; this.path = path; this.url = full_urlfor.call(ctx, path); this.config = config; this.theme = theme.config; this.layout = 'layout'; this.env = env; this. = _; this.view_dir = join(theme_dir, 'layout') + sep; this.site = localsObj; } …
完美!
参照 hexojs/hexo#3753
Global Variables
中_
已被移除(根据你的思路,我找到hexo的提交历史 参照提交历史,修改以下文件并执行命令即可修复
- 在博客目录下执行 npm install lodash
- 在[BlogPath]/node_modules/hexo/package.json 中加上
"lodash": "4.17.20"
添加后的文件如下: … "_phantomChildren": { "abbrev": "1.1.1", "bluebird": "3.7.2", "chalk": "4.1.0", "command-exists": "1.2.9", "hexo-fs": "3.1.0", "hexo-log": "2.0.0", "hexo-util": "2.4.0", "minimist": "1.2.5", "resolve": "1.18.1", "tildify": "2.0.0", "lodash": "4.17.20" }, …- 在[BlogPath]/nodemodules/hexo/lib/hexo/index.js 加上`const = require("lodash");
和
this. = ;` 添加后的文件如下: …const Promise = require('bluebird'); const { sep, join, dirname } = require('path'); const tildify = require('tildify'); const Database = require('warehouse'); const { magenta, underline } = require('chalk'); const { EventEmitter } = require('events'); const { readFile } = require('hexo-fs'); const Module = require('module'); const { runInThisContext } = require('vm'); const { version } = require('../../package.json'); const logger = require('hexo-log'); const { Console, Deployer, Filter, Generator, Helper, Injector, Migrator, Processor, Renderer, Tag } = require('../extend'); const Render = require('./render'); const registerModels = require('./register_models'); const Post = require('./post'); const Scaffold = require('./scaffold'); const Source = require('./source'); const Router = require('./router'); const Theme = require('../theme'); const Locals = require('./locals'); const defaultConfig = require('./default_config'); const loadDatabase = require('./load_database'); const multiConfigPath = require('./multi_config_path'); const { sync } = require('resolve'); const { deepMerge, full_urlfor } = require('hexo-util'); const = require('lodash'); …
class Locals { constructor(path, locals) { this.page = { ...locals }; if (this.page.path == null) this.page.path = path; this.path = path; this.url = full_urlfor.call(ctx, path); this.config = config; this.theme = theme.config; this.layout = 'layout'; this.env = env; this. = _; this.view_dir = join(theme_dir, 'layout') + sep; this.site = localsObj; } …
出现了问题,有些文章打不开了,一直处于加载状态。。。
3. const _ = require("lodash");
大佬解决了嘛
- const _ = require("lodash");
大佬解决了嘛
老老实实用 hexo 3.x 呗,毕竟是个基于 hexo3 开发的主题。我尝试改动用了_.
的地方,太多了。。。改不动。。。
- const _ = require("lodash");
大佬解决了嘛 解决了啊 楼上不有好几个人都说解决了么
- const _ = require("lodash");
大佬解决了嘛 解决了啊 楼上不有好几个人都说解决了么
我用上面的方法生成的网页在打开部分博文的时候打不开,永远在加载状态
- const _ = require("lodash");
大佬解决了嘛 解决了啊 楼上不有好几个人都说解决了么
我用上面的方法生成的网页在打开部分博文的时候打不开,永远在加载状态
有报什么错么
- const _ = require(“ lodash”);
大佬解决了嘛
老老实实用 hexo 3.x 呗,毕竟是个基于 hexo3 开发的主题。我尝试改动用了
_.
的地方,太多了。。。改不动。。。
我使用3也是出现同样的问题唉
- const _ = require(“ lodash”);
大佬解决了嘛
老老实实用 hexo 3.x 呗,毕竟是个基于 hexo3 开发的主题。我尝试改动用了
_.
的地方,太多了。。。改不动。。。我使用3也是出现同样的问题唉
输入hexo -v
指令,输出是什么?
- const _ = require(“ lodash”);
大佬解决了嘛
老老实实用 hexo 3.x 呗,毕竟是个基于 hexo3 开发的主题。我尝试改动用了
_.
的地方,太多了。。。改不动。。。我使用3也是出现同样的问题唉
输入
hexo -v
指令,输出是什么?
解决了大佬, 谢谢~~~
参照 hexojs/hexo#3753
Global Variables
中_
已被移除(根据你的思路,我找到hexo的提交历史 参照提交历史,修改以下文件并执行命令即可修复
- 在博客目录下执行 npm install lodash
- 在[BlogPath]/node_modules/hexo/package.json 中加上
"lodash": "4.17.20"
添加后的文件如下: … "_phantomChildren": { "abbrev": "1.1.1", "bluebird": "3.7.2", "chalk": "4.1.0", "command-exists": "1.2.9", "hexo-fs": "3.1.0", "hexo-log": "2.0.0", "hexo-util": "2.4.0", "minimist": "1.2.5", "resolve": "1.18.1", "tildify": "2.0.0", "lodash": "4.17.20" }, …- 在[BlogPath]/nodemodules/hexo/lib/hexo/index.js 加上`const = require("lodash");
和
this. = ;` 添加后的文件如下: …const Promise = require('bluebird'); const { sep, join, dirname } = require('path'); const tildify = require('tildify'); const Database = require('warehouse'); const { magenta, underline } = require('chalk'); const { EventEmitter } = require('events'); const { readFile } = require('hexo-fs'); const Module = require('module'); const { runInThisContext } = require('vm'); const { version } = require('../../package.json'); const logger = require('hexo-log'); const { Console, Deployer, Filter, Generator, Helper, Injector, Migrator, Processor, Renderer, Tag } = require('../extend'); const Render = require('./render'); const registerModels = require('./register_models'); const Post = require('./post'); const Scaffold = require('./scaffold'); const Source = require('./source'); const Router = require('./router'); const Theme = require('../theme'); const Locals = require('./locals'); const defaultConfig = require('./default_config'); const loadDatabase = require('./load_database'); const multiConfigPath = require('./multi_config_path'); const { sync } = require('resolve'); const { deepMerge, full_urlfor } = require('hexo-util'); const = require('lodash'); …
class Locals { constructor(path, locals) { this.page = { ...locals }; if (this.page.path == null) this.page.path = path; this.path = path; this.url = full_urlfor.call(ctx, path); this.config = config; this.theme = theme.config; this.layout = 'layout'; this.env = env; this. = _; this.view_dir = join(theme_dir, 'layout') + sep; this.site = localsObj; } …
太强了 太强了 完美解决
- const _ = require(“ lodash”);
大佬解决了嘛 解决了啊楼上不有好几个人都说解决了么
我用上面的方法生成的网页在打开部分博文的时候打不开,永远在加载状态
我也遇到这个问题, 是因为我删掉了/layout/_partial/footer.ejs里面的内容,导致themes/indigo/source/js/main.js的227行nav.nextElementSibling.offsetHeight报错了,你可以看下console的js报错, 如果你的也是这个问题的话, 把nav.nextElementSibling.offsetHeight改成0就可以了
不折腾了,也是部分文章加载有问题,最后回滚到 4.2.1 版本了。
npm uninstall hexo
npm install hexo@4.2.1 --save
参照 hexojs/hexo#3753
Global Variables
中_
已被移除(根据你的思路,我找到hexo的提交历史 参照提交历史,修改以下文件并执行命令即可修复
- 在博客目录下执行 npm install lodash
- 在[BlogPath]/node_modules/hexo/package.json 中加上
"lodash": "4.17.20"
添加后的文件如下: … "_phantomChildren": { "abbrev": "1.1.1", "bluebird": "3.7.2", "chalk": "4.1.0", "command-exists": "1.2.9", "hexo-fs": "3.1.0", "hexo-log": "2.0.0", "hexo-util": "2.4.0", "minimist": "1.2.5", "resolve": "1.18.1", "tildify": "2.0.0", "lodash": "4.17.20" }, …- 在[BlogPath]/nodemodules/hexo/lib/hexo/index.js 加上`const = require("lodash");
和
this. = ;` 添加后的文件如下: …const Promise = require('bluebird'); const { sep, join, dirname } = require('path'); const tildify = require('tildify'); const Database = require('warehouse'); const { magenta, underline } = require('chalk'); const { EventEmitter } = require('events'); const { readFile } = require('hexo-fs'); const Module = require('module'); const { runInThisContext } = require('vm'); const { version } = require('../../package.json'); const logger = require('hexo-log'); const { Console, Deployer, Filter, Generator, Helper, Injector, Migrator, Processor, Renderer, Tag } = require('../extend'); const Render = require('./render'); const registerModels = require('./register_models'); const Post = require('./post'); const Scaffold = require('./scaffold'); const Source = require('./source'); const Router = require('./router'); const Theme = require('../theme'); const Locals = require('./locals'); const defaultConfig = require('./default_config'); const loadDatabase = require('./load_database'); const multiConfigPath = require('./multi_config_path'); const { sync } = require('resolve'); const { deepMerge, full_urlfor } = require('hexo-util'); const = require('lodash'); … class Locals { constructor(path, locals) { this.page = { ...locals }; if (this.page.path == null) this.page.path = path; this.path = path; this.url = full_urlfor.call(ctx, path); this.config = config; this.theme = theme.config; this.layout = 'layout'; this.env = env; this. = _; this.view_dir = join(theme_dir, 'layout') + sep; this.site = localsObj; } …
出现了问题,有些文章打不开了,一直处于加载状态。。。
我是这种情况 #526 文章分级标题 ”### 标题” 这种会报错。 看来只能用hexo4版本了
@zhz 我用了你提供的方法,完美的解决了我的问题,十分感谢!
我的运行环境是ubuntu云服务器,把public目录托管给nginx服务器
切换为默认主题,next主题都能正常生成,indigo无法生成,报错如下: