【问题标题】:Using Yarn in Sage Wordpress Starter Template在 Sage Wordpress 入门模板中使用 Yarn
【发布时间】:2017-02-23 16:24:49
【问题描述】:

您好,我最近在很长一段时间后再次开始使用 sage,很多事情对我来说似乎都发生了变化。我必须安装 yarn,但是当我尝试运行命令 yarn run build 时,我得到了:

λ yarn run build
yarn run v0.20.3
$ webpack --progress --config assets/build/webpack.config.js
F:\www\xxxxxx\wp-content\themes\23022017\node_modules\copy-globs-webpack-plugin\index.js:101
const { promisify } = __webpack_require__(0);
      ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:414:25)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:311:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (F:\www\xxxxxx\wp-content\themes\23022017\assets\build\webpack.config.js:10:25)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

现在我已经在终端中成功运行了以下命令:

composer self-update
composer update
npm install
yarn

我是 yarn 和 webpack 的新手,所以我什至无法理解我在这里做错了什么或如何解决它。

操作系统: Windows 10

NodeJS: 4.8.0

【问题讨论】:

    标签: webpack yarnpkg roots-sage


    【解决方案1】:

    在这里解决: https://github.com/roots/sage/issues/1843

    看来问题出在我的 NodeJS 版本上。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-26
      • 1970-01-01
      • 2013-04-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多