首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当尝试使用任何离子插件时,在to趋向/离子角项目中出现错误。

当尝试使用任何离子插件时,在to趋向/离子角项目中出现错误。
EN

Stack Overflow用户
提问于 2022-04-26 03:34:35
回答 1查看 362关注 0票数 0

我正试图在我的项目中使用nx趋向/离子角,但是我在使用plugins第一种用例时被卡住了:需要获得当前的应用版本,所以我已经安装了这些依赖项: 1)npm安装cordova-plugin- app -version 2) npm install @ need cordova-plugins/app- version -当我试图在android studio仿真程序中运行时,错误率很低。

第二个用例需要对摄像机插件使用类似的错误。

package.json

代码语言:javascript
复制
{
"name": "anch",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"start": "nx serve",
"build": "nx build",
"test": "nx test",
"postinstall": "ngcc --properties es2015 browser module main"
},
"private": true,
"dependencies": {
"@angular/animations": "~13.3.0",
"@angular/common": "~13.3.0",
"@angular/compiler": "~13.3.0",
"@angular/core": "~13.3.0",
"@angular/forms": "~13.3.0",
"@angular/platform-browser": "~13.3.0",
"@angular/platform-browser-dynamic": "~13.3.0",
"@angular/router": "~13.3.0",
"@awesome-cordova-plugins/app-version": "^5.41.0",
"@capacitor/camera": "^1.3.1",
"@capacitor/core": "^3.2.5",
"@capacitor/filesystem": "^1.1.0",
"@capacitor/storage": "^1.2.5",
"@ionic/angular": "^5.8.3",
"@ionic/pwa-elements": "^3.1.1",
"cordova-plugin-app-version": "^0.1.14",
"rxjs": "~7.4.0",
"tslib": "^2.0.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.3.0",
"@angular-eslint/eslint-plugin": "~13.1.0",
"@angular-eslint/eslint-plugin-template": "~13.1.0",
"@angular-eslint/template-parser": "~13.1.0",
"@angular/cli": "~13.3.0",
"@angular/compiler-cli": "~13.3.0",
"@angular/language-service": "~13.3.0",
"@capacitor/android": "^3.2.5",
"@capacitor/cli": "^3.2.5",
"@capacitor/ios": "^3.2.5",
"@nrwl/angular": "^13.0.0",
"@nrwl/cli": "14.0.2",
"@nrwl/cypress": "13.10.3",
"@nrwl/eslint-plugin-nx": "13.10.3",
"@nrwl/jest": "13.10.3",
"@nrwl/linter": "13.10.3",
"@nrwl/workspace": "14.0.2",
"@nxtend/capacitor": "^13.0.0",
"@types/jest": "27.0.2",
"@typescript-eslint/eslint-plugin": "~5.18.0",
"@typescript-eslint/parser": "~5.18.0",
"cypress": "^9.1.0",
"eslint": "~8.12.0",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-cypress": "^2.10.3",
"jest": "27.2.3",
"jest-preset-angular": "11.1.1",
"nx": "14.0.2",
"prettier": "^2.5.1",
"ts-jest": "27.0.5",
"typescript": "~4.6.2"
}
}```
EN

回答 1

Stack Overflow用户

发布于 2022-10-18 14:15:44

您必须将这些插件添加到应用程序的package.json中,而不仅仅是monorepo的package.json

首先,和其他库一样,在monorepo中像往常一样安装包,然后在应用程序的package.json中添加相同的条目。您不需要在应用程序中使用npm install,只需确保这些插件在两个地方都列出。然后使用nx run my-app:cap --cmd=sync同步所有内容(或者运行电容命令)。应该在应用程序的本机构建中检测和引用插件。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72008072

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档