【发布时间】:2022-07-21 05:02:18
【问题描述】:
我正在尝试MDN Front End Developer course 的Understanding client-side web development tools 模块的Introducing a complete toolchain 章节。我已经到达最后的运行转换部分,说明建议运行npx parcel src/index.html。在这个阶段我遇到了两个问题。
-
build 进程卡在
Building scheduler-tracing.development.js。在多次中止尝试后,我让它运行了 6 个小时,然后中止。 - 中止进程并重新运行后,我收到以下错误:
/home/username/dev/will-it-miss/src/index.css:undefined:undefined: plugin is not a function
at LazyResult.run (/home/username/dev/will-it-miss/node_modules/parcel-bundler/node_modules/postcss/lib/lazy-result.js:288:14)
at LazyResult.asyncTick (/home/username/dev/will-it-miss/node_modules/parcel-bundler/node_modules/postcss/lib/lazy-result.js:212:26)
at /home/username/dev/will-it-miss/node_modules/parcel-bundler/node_modules/postcss/lib/lazy-result.js:254:14
at new Promise (<anonymous>)
at LazyResult.async (/home/username/dev/will-it-miss/node_modules/parcel-bundler/node_modules/postcss/lib/lazy-result.js:250:23)
at LazyResult.then (/home/username/dev/will-it-miss/node_modules/parcel-bundler/node_modules/postcss/lib/lazy-result.js:131:17)
作为开发新手,我在解决此错误方面运气不佳,但目前采取的措施如下:
- 将
index.js script类型设置为模块,并按照MDN Discourse forum 上此线程中的建议更新了SVG 路径。 - 将 index.css 中的 postcss 特定嵌套选择器替换为常规选择器
- 将 postcss 的项目版本恢复到以前的版本
- 从头开始删除并重建项目 5~ 次并获得相同的结果(卡住
building scheduler-tracing.development.js、中止进程、重新运行以及与上述 index.css 相关的错误。
另一个用户报告了与我在链接论坛帖子中显示的相同的错误。如果有任何其他信息可能有助于解决此错误,请告诉我。
【问题讨论】:
标签: javascript