gpt4 book ai didi

angular - 汇总 - 命名空间冲突

转载 作者:太空狗 更新时间:2023-10-29 17:28:58 30 4
gpt4 key购买 nike

我目前正在构建 Ionic 2-RC3 应用程序。但是自从我升级到 RC-1 后,我遇到了以下错误:(不确定它们是否保持不变,但你明白了)。

[15:16:17]  rollup: Conflicting namespaces:
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\index.js re-exports 'TextAst' from
both
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js
(will be ignored) and
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js.
[15:16:17] rollup: Conflicting namespaces:
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\index.js re-exports 'BoundTextAst'
from both
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js
(will be ignored) and
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js.
[15:16:17] rollup: Conflicting namespaces:
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\index.js re-exports 'AttrAst' from
both
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js
(will be ignored) and
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js.
[15:16:17] rollup: Conflicting namespaces:
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\index.js re-exports
'BoundElementPropertyAst' from both
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js
(will be ignored) and
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js.
[15:16:17] rollup: Conflicting namespaces:
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\index.js re-exports
'BoundEventAst' from both
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js
(will be ignored) and
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js.
[15:16:17] rollup: Conflicting namespaces:
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\index.js re-exports 'ReferenceAst'
from both
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js
(will be ignored) and
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js.
[15:16:17] rollup: Conflicting namespaces:
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\index.js re-exports 'VariableAst'
from both
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js
(will be ignored) and
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js.
[15:16:17] rollup: Conflicting namespaces:
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\index.js re-exports 'ElementAst'
from both
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js
(will be ignored) and
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js.
[15:16:17] rollup: Conflicting namespaces:
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\index.js re-exports
'EmbeddedTemplateAst' from both
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js
(will be ignored) and
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js.
[15:16:17] rollup: Conflicting namespaces:
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\index.js re-exports
'BoundDirectivePropertyAst' from both
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js
(will be ignored) and
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js.
[15:16:17] rollup: Conflicting namespaces:
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\index.js re-exports 'DirectiveAst'
from both
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js
(will be ignored) and
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js.
[15:16:17] rollup: Conflicting namespaces:
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\index.js re-exports 'ProviderAst'
from both
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js
(will be ignored) and
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js.
[15:16:17] rollup: Conflicting namespaces:
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\index.js re-exports
'ProviderAstType' from both
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js
(will be ignored) and
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js.
[15:16:17] rollup: Conflicting namespaces:
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\index.js re-exports 'NgContentAst'
from both
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js
(will be ignored) and
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js.
[15:16:17] rollup: Conflicting namespaces:
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\index.js re-exports
'PropertyBindingType' from both
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js
(will be ignored) and
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js.
[15:16:17] rollup: Conflicting namespaces:
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\index.js re-exports
'templateVisitAll' from both
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js
(will be ignored) and
C:\Users\Ivar\documents\ionic2-boilerplate\node_modules\@angular\compiler\src\template_parser\template_ast.js.

package.json

{
"name": "ionic2-boilerplate",
"author": "Quintor",
"version": "0.2.0",
"keywords": [
"ionic2",
"angular2",
"rollup",
"typescript",
"karma"
],
"engines": {
"node": ">= 6.6.0",
"npm": ">= 3"
},
"scripts": {
"dev": "bnr dev",
"build": "bnr build",
"test": "bnr test",
"pree2e": "cd www && python -m SimpleHTTPServer 8090 >> ../python_serve.log 2>&1 &",
"e2e": "protractor config/protractor.conf.js",
"pree2e:interactive": "npm run pree2e",
"e2e:interactive": "protractor config/protractor.conf.js --elementExplorer",
"watch": "ionic-app-scripts watch",
"serve:before": "watch",
"emulate:before": "build",
"deploy:before": "build",
"build:before": "build",
"run:before": "build --dev",
"ios:dev": "bnr ios:dev",
"ios:release": "bnr ios:release",
"android:dev": "bnr android:dev",
"android:release": "bnr android:release",
"commit": "git-cz",
"release": "standard-version --no-verify",
"push": "git push --follow-tags origin master",
"lint": "tslint \"src/**/*.ts\" --exclude=src/**/*.d.ts",
"scss-lint": "scss-lint",
"docs": "typedoc --options typedoc.json --exclude '**/*.spec.ts' ./src/",
"outdated": "npm outdated --depth 0",
"postinstall": "webdriver-manager update --chrome"
},
"betterScripts": {
"dev": {
"command": "ionic serve",
"env": {
"NODE_ENV": "development",
"PLATFORM": "web"
}
},
"build": {
"command": "ionic-app-scripts build",
"env": {
"NODE_ENV": "production",
"PLATFORM": "web"
}
},
"test": {
"command": "karma start ./config/karma.conf.js",
"env": {
"NODE_ENV": "test"
}
},
"ios:dev": {
"command": "ionic run ios --livereload",
"env": {
"NODE_ENV": "development",
"PLATFORM": "ios"
}
},
"ios:release": {
"command": "npm run build && ionic build ios",
"env": {
"NODE_ENV": "production",
"PLATFORM": "ios"
}
},
"android:dev": {
"command": "ionic run android --livereload",
"env": {
"NODE_ENV": "development",
"PLATFORM": "android"
}
},
"android:release": {
"command": "npm run build && ionic build android",
"env": {
"NODE_ENV": "production",
"PLATFORM": "android"
}
}
},
"dependencies": {
"@angular/common": "2.1.1",
"@angular/compiler": "2.1.1",
"@angular/compiler-cli": "2.1.1",
"@angular/core": "2.1.1",
"@angular/forms": "2.1.1",
"@angular/http": "2.1.1",
"@angular/platform-browser": "2.1.1",
"@angular/platform-browser-dynamic": "2.1.1",
"@angular/platform-server": "2.1.1",
"@ionic/storage": "1.1.6",
"ionic-angular": "2.0.0-rc.3",
"ionic-native": "2.2.3",
"ionicons": "3.0.0",
"rxjs": "5.0.0-beta.12",
"zone.js": "0.6.26",
"lz-string": "^1.4.4",
"ng2-charts": "^1.4.1"
},
"devDependencies": {
"@ionic/app-scripts": "0.0.46",
"@types/jasmine": "2.2.34",
"@types/lodash": "^4.14.36",
"better-npm-run": "0.0.11",
"codelyzer": "^1.0.0-beta.0",
"commitizen": "^2.8.6",
"cz-conventional-changelog": "^1.2.0",
"ghooks": "^1.3.2",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "^2.7.0",
"karma": "1.3.0",
"karma-chrome-launcher": "2.0.0",
"karma-coverage": "^1.1.1",
"karma-jasmine": "1.0.2",
"karma-phantomjs-launcher": "^1.0.2",
"karma-rollup-plugin": "^0.2.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.26",
"phantomjs-prebuilt": "^2.1.12",
"protractor": "^4.0.9",
"protractor-jasmine2-screenshot-reporter": "^0.3.2",
"rollup-plugin-alias": "^1.2.0",
"rollup-plugin-angular": "^0.4.2",
"rollup-plugin-buble": "^0.14.0",
"rollup-plugin-commonjs": "^5.0.4",
"rollup-plugin-node-resolve": "^2.0.0",
"rollup-plugin-replace": "^1.1.1",
"rollup-plugin-typescript": "^0.8.1",
"standard-version": "^2.2.1",
"ts-helpers": "^1.1.1",
"ts-node": "^1.3.0",
"typedoc": "^0.4.5",
"typescript": "^2.0.3",
"validate-commit-msg": "^2.8.0"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
},
"ionic_rollup": "./config/rollup.config.js"
},
"description": "ionic2-boilerplate: An Ionic project",
"cordovaPlugins": [
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"ionic-plugin-keyboard",
{
"variables": {
"SENDER_ID": "123456789 1337"
},
"locator": "phonegap-plugin-push",
"id": "phonegap-plugin-push"
}
],
"cordovaPlatforms": [],
"license": "MIT"
}

现在我的问题是,是哪条线路造成了这种情况,为什么会发生这种情况?因为对我来说,我的 package.json 中似乎没有重复值。

rm -rf node_modules && npm install 没有解决这个问题。

最佳答案

可能是 rollup.config.js 的问题

Default ionic rollup config

另请查看 Third party module exports here .

你可以:

Open node_modules/@ionic/app-scripts/config/rollup.config.js and copy and paste the file content into scripts/rollup.config.js.

然后从那里开始,但如果您有自定义设置,则需要一些返工。希望对您有所帮助。

关于angular - 汇总 - 命名空间冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40766996/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com