【发布时间】:2020-12-17 12:09:07
【问题描述】:
我对 Node、npm 和 webpack 还是很陌生。我正在尝试使用 Tailwind css 设置 Craft 3 environment。
开箱即用一切正常,但是当我运行npm run dev 时出现以下错误:
> craftcms-tailwind@1.0.0 dev /Users//sites/***/www
> gulp dev
/Users/***/sites/***/www/node_modules/prettier/third-party.js:9871
for await (const place of this.config.searchPlaces) {
^^^^^
SyntaxError: Unexpected reserved word
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/***/sites/***/www/node_modules/prettier/index.js:16551:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! craftcms-tailwind@1.0.0 dev: `gulp dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the craftcms-tailwind@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/***/.npm/_logs/2020-08-28T14_23_16_034Z-debug.log
为什么会出现这种情况,我如何确保我可以在未来解决这个问题?
【问题讨论】:
-
你写过代码吗?
-
我更新/添加/删除了一些 Craft 插件。但是还没有写或接触过任何类型的css/js。
-
您是否将 Craft 3 包导入到您的代码中?
-
你的节点版本是什么?
-
@KiJéy 我在 v8.11.3 上运行节点
标签: node.js npm webpack gulp prettier