ember.js - Ember 构建问题:“不能同时使用 decorators 和 decorators-legacy 插件”
问题描述
我最近在使用 bitbucket 管道构建我的 ember 项目时遇到了一个问题:
+ ember build --environment="production"
Could not start watchman
Visit https://ember-cli.com/user-guide/#watchman for more info.
Building
Environment: production
cleaning up
cleaning up...
Build Error (broccoli-persistent-filter:Babel > [Babel: ember-data]) in ember-data/adapters/json-api.js
Cannot use the decorators and decorators-legacy plugin together
我目前使用的是 ember-cli 版本 3.8.1。
所有构建环境都会出现此问题,而不仅仅是生产环境。让我感到困惑的是,在上次成功构建和此后一直失败的构建之间没有添加新的 npm 包或 ember 插件 - 现在如果我重新运行成功的构建,那也会失败。
我已经回到提交历史记录到一个有效的提交,然后一步一步快进到现在 - 总是删除 node_modules 并重新安装包。它总是在本地工作,但是当管道运行时它总是会失败。
我也尝试过更新我的 docker 镜像。
我已经尝试过这里列出的解决方案——但似乎它们已经在 3.8.1 版中得到解决。
另外,如果有任何帮助,这是我的 bitbucket-pipelines.yml:
pipelines:
branches:
master:
- step:
name: Building Ember Project
script:
- npm install
- npm install firebase-tools
- ember build --environment="production"
- step:
trigger: manual
deployment: production
name: Deploy to Production
script:
- firebase use prod
- firebase deploy --non-interactive --token ${FIREBASE_TOKEN}
谢谢大家!
解决方案
这听起来像是在引擎盖下动态更改的子依赖项。你有一个 npm 或 yarn 锁文件作为你的 repo 的一部分提交吗?锁定文件专门设计用于防止遇到这样的障碍
推荐阅读
- python - 使用 python 包发布动态库 *.so 的正确方法是什么?
- apache-spark - pyspark 计算每组的空值数
- python - 如何使用 image_dataset_from_directory 生成的数据处理二进制分类器对 ROC、AUC 和混淆矩阵的预测结果?
- git - Git:协议是否支持更新构建状态?
- python - 如何绘制下图?
- javascript - 生成一个 flexbox 布局并用两个 JavaScript 函数动态填充它
- c++ - 包含 unique_ptr 的 unique_ptr
- selenium - 错误:会话 ID 为空。调用 quit() 后使用 WebDriver?- 并行执行 - AfterMethod driver.quit/close
- c# - CS1001 标识符应在 Unity 中使用
- heroku - 无法使用 heroku salesforce auth 登录