Ionic 2 rollup git clone error namespace conflict

Hi all,

I created an ionic project and cloned it elsewhere, when I run ionic serve, I get errors such as the following.

[21:29:17]  rollup: Conflicting namespaces: /Users/pbrack/dev/paystumped/paystumped/node_modules/@angular/compiler/index.js
            re-exports 'PropertyBindingType' from both /Users/pbrack/dev/paystumped/paystumped/node_modules/@angular/compiler/src/template_parser/template_ast.js
            (will be ignored) and /Users/pbrack/dev/paystumped/paystumped/node_modules/@angular/compiler/src/template_parser/template_ast.js.
[21:29:17]  rollup: Conflicting namespaces: /Users/pbrack/dev/paystumped/paystumped/node_modules/@angular/compiler/index.js
            re-exports 'templateVisitAll' from both /Users/pbrack/dev/paystumped/paystumped/node_modules/@angular/compiler/src/template_parser/template_ast.js
            (will be ignored) and /Users/pbrack/dev/paystumped/paystumped/node_modules/@angular/compiler/src/template_parser/template_ast.js.
[21:29:23]  bundle finished in 7.48 s

When I run ionic build ios I get the following error.

[21:39:42]  /Users/pbrack/dev/paystumped/paystumped/node_modules/@angular/compiler-cli/src/private_import_compiler.js:10
[21:39:42]  exports.AssetUrl = compiler_1.__compiler_private__.AssetUrl;
[21:39:42]  TypeError: Cannot read property 'AssetUrl' of undefined
[21:39:42]  ngc failed
[21:39:42]  ionic-app-script task: "build"
[21:39:42]  Error: Error

Has anyone else seen this? If so, how can I avoid the warnings.

1 Like

Any chance you put the contents of node_modules under version control? I think that’s generally considered a bad idea.

I am facing same error here :frowning:

rollup: Conflicting namespaces: /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/index.js
re-exports ‘TextAst’ from both /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/src/template_parser/template_ast.js
(will be ignored) and /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/src/template_parser/template_ast.js.
[12:28:52] rollup: Conflicting namespaces: /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/index.js
re-exports ‘BoundTextAst’ from both /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/src/template_parser/template_ast.js
(will be ignored) and /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/src/template_parser/template_ast.js.
[12:28:52] rollup: Conflicting namespaces: /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/index.js
re-exports ‘AttrAst’ from both /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/src/template_parser/template_ast.js
(will be ignored) and /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/src/template_parser/template_ast.js.
[12:28:52] rollup: Conflicting namespaces: /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/index.js
re-exports ‘BoundElementPropertyAst’ from both /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/src/template_parser/template_ast.js
(will be ignored) and /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/src/template_parser/template_ast.js.
[12:28:52] rollup: Conflicting namespaces: /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/index.js
re-exports ‘BoundEventAst’ from both /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/src/template_parser/template_ast.js
(will be ignored) and /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/src/template_parser/template_ast.js.
[12:28:52] rollup: Conflicting namespaces: /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/index.js
re-exports ‘ReferenceAst’ from both /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/src/template_parser/template_ast.js
(will be ignored) and /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/src/template_parser/template_ast.js.
[12:28:52] rollup: Conflicting namespaces: /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/index.js
re-exports ‘VariableAst’ from both /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/src/template_parser/template_ast.js
(will be ignored) and /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/src/template_parser/template_ast.js.
[12:28:52] rollup: Conflicting namespaces: /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/index.js
re-exports ‘ElementAst’ from both /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/src/template_parser/template_ast.js
(will be ignored) and /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/src/template_parser/template_ast.js.
[12:28:52] rollup: Conflicting namespaces: /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/index.js
re-exports ‘EmbeddedTemplateAst’ from both /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/src/template_parser/template_ast.js
(will be ignored) and /home/nd/Desktop/Ionic2/myApp/node_modules/@angular/compiler/src/template_parser/template_ast.js.

This dependencies worked for me, Please try it.

"dependencies": {
    "@angular/common": "2.0.0",
    "@angular/compiler": "2.0.0",
    "@angular/compiler-cli": "0.6.2",
    "@angular/core": "2.0.0",
    "@angular/forms": "2.0.0",
    "@angular/http": "2.0.0",
    "@angular/platform-browser": "2.0.0",
    "@angular/platform-browser-dynamic": "2.0.0",
    "@angular/platform-server": "2.0.0",
    "@ionic/storage": "1.0.3",
    "ionic-angular": "2.0.0-rc.1",
    "ionic-native": "2.2.3",
    "ionicons": "3.0.0",
    "moment": "2.15.1",
    "rxjs": "5.0.0-beta.12",
    "zone.js": "0.6.21"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^0.0.36",
    "typescript": "^2.0.3"
  },
1 Like

I’m also getting the same thing, even with the same dependencies. Ran rm -rf node_modules and npm cache clean and a fresh npm install multiple times, but I get the same thing.

Same here :frowning:

Patricks-MacBook-Pro:EKD sales$ node --version
v6.9.1
Patricks-MacBook-Pro:EKD sales$ npm --version
3.10.9
Patricks-MacBook-Pro:EKD sales$ ionic --version
2.1.1
Patricks-MacBook-Pro:EKD sales$ cordova --version
6.3.1

on npm run build / ionic build
I get a [14:22:10] TypeError: Cannot read property ‘AssetUrl’ of undefined

ionic serve works fine, only throws the conflicting namespaces warnings at rollup

THIS fixed it for me :

Pin down the versions, remove all caret signs (^) before version numbers, if you have any .

2 Likes

This also worked for me and I deleted node_modules first just to be safe.

I too got the same AssetUrl error. I removed the caret sign. When I run ionic build, I am getting following error

[09:17:28] lint finished in 4.67 s
[09:17:51] Error: Error at c:/git_projects/Service/4144_1/Se
vice/static/OTS/node_modules/@angular/platform-browser/src/private_import_core.
.ts:12:56

[09:17:51] Property ‘VIEW_ENCAPSULATION_VALUES’ does not exist on type ‘{ isDe
aultChangeDetectionStrategy
[09:17:51] (changeDetectionStrategy: ChangeDetectionStrategy) => boolean…’.
[09:17:51] Error at c:/git_projects/Service/4144_1/Service/s
atic/OTS/node_modules/@angular/compiler/src/private_import_core.d.ts:26:57
[09:17:51] Property ‘MAX_INTERPOLATION_VALUES’ does not exist on type ‘{ isDef
ultChangeDetectionStrategy
[09:17:51] (changeDetectionStrategy: ChangeDetectionStrategy) => boolean…’.
[09:17:51] Error at c:/git_projects/Service/4144_1/Service/s
atic/OTS/node_modules/@angular/compiler/src/private_import_core.d.ts:27:45
[09:17:51] Property ‘checkBinding’ does not exist on type ‘{ isDefaultChangeDe
ectionStrategy
[09:17:51] (changeDetectionStrategy: ChangeDetectionStrategy) => boolean…’.

Seeing same problems, many of them. So far for no breaking changes in RC2.

rollup: Conflicting namespaces: /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/index.js

            re-exports 'TextAst' from both
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js (will be
            ignored) and
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js.
[23:14:08]  rollup: Conflicting namespaces: /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/index.js
            re-exports 'BoundTextAst' from both
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js (will be
            ignored) and
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js.
[23:14:08]  rollup: Conflicting namespaces: /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/index.js
            re-exports 'AttrAst' from both

            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js (will be

            ignored) and
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js.

[23:14:08]  rollup: Conflicting namespaces: /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/index.js
            re-exports 'BoundElementPropertyAst' from both
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js (will be
            ignored) and
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js.

[23:14:08]  rollup: Conflicting namespaces: /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/index.js
            re-exports 'BoundEventAst' from both
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js (will be
            ignored) and
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js.
[23:14:08]  rollup: Conflicting namespaces: /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/index.js

            re-exports 'ReferenceAst' from both
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js (will be
            ignored) and
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js.

[23:14:08]  rollup: Conflicting namespaces: /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/index.js
            re-exports 'VariableAst' from both

            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js (will be
            ignored) and
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js.
[23:14:08]  rollup: Conflicting namespaces: /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/index.js
            re-exports 'ElementAst' from both
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js (will be

            ignored) and
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js.

[23:14:08]  rollup: Conflicting namespaces: /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/index.js
            re-exports 'EmbeddedTemplateAst' from both
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js (will be
            ignored) and
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js.

[23:14:08]  rollup: Conflicting namespaces: /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/index.js
            re-exports 'BoundDirectivePropertyAst' from both
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js (will be
            ignored) and
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js.
[23:14:08]  rollup: Conflicting namespaces: /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/index.js
            re-exports 'DirectiveAst' from both
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js (will be
            ignored) and
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js.

[23:14:08]  rollup: Conflicting namespaces: /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/index.js
            re-exports 'ProviderAst' from both

            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js (will be
            ignored) and
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js.
[23:14:08]  rollup: Conflicting namespaces: /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/index.js
            re-exports 'ProviderAstType' from both
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js (will be
            ignored) and
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js.
[23:14:08]  rollup: Conflicting namespaces: /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/index.js

            re-exports 'NgContentAst' from both
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js (will be
            ignored) and
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js.

[23:14:08]  rollup: Conflicting namespaces: /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/index.js
            re-exports 'PropertyBindingType' from both
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js (will be
            ignored) and
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js.
[23:14:08]  rollup: Conflicting namespaces: /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/index.js
            re-exports 'templateVisitAll' from both
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js (will be

            ignored) and
            /Users/tyrion/devel/saveup-front/node_modules/@angular/compiler/src/template_parser/template_ast.js.
1 Like

Same problem, it appear when i try to update ionic_rollup in package.json