【问题标题】:TypeError: node.getIterator is not a function when using VuePressTypeError:使用 VuePress 时 node.getIterator 不是函数
【发布时间】:2021-09-06 20:41:02
【问题描述】:

我正在关注https://v1.vuepress.vuejs.org/guide/getting-started.html#quick-start 以生成一个新的 VuePress 站点。 我做了以下事情(我使用的是 Node 15.4.0):

npx create-vuepress-site
cd docs
npm install
npm run build

我明白了:

TypeError: node.getIterator 不是函数 在 LazyResult.visitTick (/home/marcin/tmp/vuepress-testing/docs/node_modules/optimize-css-assets-webpack-plugin/node_modules/postcss/lib/lazy-result.js:528:33) 在 LazyResult.runAsync (/home/marcin/tmp/vuepress-testing/docs/node_modules/optimize-css-assets-webpack-plugin/node_modules/postcss/lib/lazy-result.js:408:30) 在 LazyResult.async (/home/marcin/tmp/vuepress-testing/docs/node_modules/optimize-css-assets-webpack-plugin/node_modules/postcss/lib/lazy-result.js:221:30) 在 LazyResult.then (/home/marcin/tmp/vuepress-testing/docs/node_modules/optimize-css-assets-webpack-plugin/node_modules/postcss/lib/lazy-result.js:206:17) 在 OptimizeCssAssetsWebpackPlugin.processCss (/home/marcin/tmp/vuepress-testing/docs/node_modules/optimize-css-assets-webpack-plugin/src/index.js:81:8) 在 Object.processor (/home/marcin/tmp/vuepress-testing/docs/node_modules/optimize-css-assets-webpack-plugin/src/index.js:20:18) 在/home/marcin/tmp/vuepress-testing/docs/node_modules/last-call-webpack-plugin/src/index.js:150:10 在 arrayEach (/home/marcin/tmp/vuepress-testing/docs/node_modules/lodash/_arrayEach.js:15:9) 在 forEach (/home/marcin/tmp/vuepress-testing/docs/node_modules/lodash/forEach.js:38:10) 在 OptimizeCssAssetsWebpackPlugin.process (/home/marcin/tmp/vuepress-testing/docs/node_modules/last-call-webpack-plugin/src/index.js:147:5) 在/home/marcin/tmp/vuepress-testing/docs/node_modules/last-call-webpack-plugin/src/index.js:178:28 在 AsyncSeriesHook.eval [as callAsync] (创建时的评估(/home/marcin/tmp/vuepress-testing/docs/node_modules/tapable/lib/HookCodeFactory.js:33:10),:25:17) 在 AsyncSeriesHook.lazyCompileHook (/home/marcin/tmp/vuepress-testing/docs/node_modules/tapable/lib/Hook.js:154:20) 在/home/marcin/tmp/vuepress-testing/docs/node_modules/webpack/lib/Compilation.js:1409:36 在 AsyncSeriesHook.eval [as callAsync] (创建时的评估(/home/marcin/tmp/vuepress-testing/docs/node_modules/tapable/lib/HookCodeFactory.js:33:10),:9:1) 在 AsyncSeriesHook.lazyCompileHook (/home/marcin/tmp/vuepress-testing/docs/node_modules/tapable/lib/Hook.js:154:20)

我还注意到,同样的错误开始出现在我现有的 VuePress 网站上,该网站之前没有问题(我认为甚至在昨天)。 问题是什么?我能以某种方式绕过它吗?

【问题讨论】:

    标签: vuepress


    【解决方案1】:

    这里也一样。 我将 vuepress 锁定到 1.8.1 版本,并且构建似乎很好......直到错误修复。

    【讨论】:

    • 你是怎么做到的?我尝试设置"vuepress": "^1.8.1",但在npm installnpm run build 之后出现同样的错误。
    • 没关系,知道了 ("vuepress": "1.8.1")
    猜你喜欢
    • 1970-01-01
    • 2013-07-16
    • 2019-04-01
    • 2015-11-23
    • 1970-01-01
    • 2019-02-17
    • 2018-04-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多