Yanick Rochon
Yanick Rochon

Reputation: 53526

Package conflict in meteor : Angular2 and Templating

I am in and out of a project with Meteor, trying to wrap my head around this framework (documentation is comparable to Ruby... just terrible and fragmented), and I get this error :

While determining active plugins: error: conflict: two packages included in the app (barbatus:angular2 and templating) are both trying to handle *.html

And this is my installed packages :

autopublish               1.0.4  (For prototyping only) Publish the entire d...
blaze-html-templates      1.0.1  Compile HTML templates into reactive UI wit...
ecmascript                0.1.5  Compiler plugin that supports ES2015+ in al...
es5-shim                  4.1.13  Shims and polyfills to improve ECMAScript ...
flemay:less-autoprefixer  1.1.0  The dynamic stylesheet language + Autoprefixer
insecure                  1.0.4  (For prototyping only) Allow all database w...
jquery                    1.11.4  Manipulate the DOM using CSS selectors
meteor-base               1.0.1  Packages that every Meteor app needs
mobile-experience         1.0.1  Packages for a great mobile user experience
mongo                     1.1.2  Adaptor for using MongoDB and Minimongo ove...
semantic:ui               2.1.4  Official Semantic UI Integration for Meteor
session                   1.1.1  Session variable
standard-minifiers        1.0.1  Standard minifiers used with Meteor apps by...
tracker                   1.0.9  Dependency tracker to allow reactive callbacks
urigo:angular2-meteor     0.2.0+ Angular2 and Meteor integration

Now, I know that barbatus:angular2 is used by urigo:angular2-meteor, but I'm unsure why it would conflict with templating (which is obviously required by something else... if not meteor-base itself.

How do I fix this?

** Edit **

This is my only .html file :

<head>
  <title>larpdb</title>
</head>

<body>
  <h1>Welcome to Meteor!</h1>

  {{> hello}}
</body>

<template name="hello">
  <button>Click Me</button>
  <p>You've pressed the button {{counter}} times.</p>
</template>

Basically, this is a brand new empty project; how can I avoid getting this error? Do I have to strictly not use <template> tags in my project?

Upvotes: 2

Views: 820

Answers (3)

Abhay Kumar
Abhay Kumar

Reputation: 5383

meteor remove blaze-html-templates

meteor remove ecmascript

Run the following commands to remove meteor's default ecmascript package . Now the app should run fine .

Upvotes: 0

user5402966
user5402966

Reputation: 46

In Meteor 1.2.0.2 you can use

> meteor remove blaze-html-templates

 Changes to your project's package version selections:

 blaze-html-templates   removed from your project
 caching-compiler       removed from your project
 caching-html-compiler  removed from your project
 templating             removed from your project
 templating-tools       removed from your project

Then add the urigo:angular2-meteor package (must download from GitHub)

 > meteor add urigo:angular2-meteor

Upvotes: 3

Shrinath
Shrinath

Reputation: 362

In meteor .html file have templates only. If you are creating angular templates and giving same extension then at that time it will throw error. because in meteor only master file have html tag and if you adding different html file not having template tag then it will treat it as HTML file and add html tag in it while building.

so if you are creating templates for angular just rename it somefile.ng.html. so that while meteor build it will don't have conflict.

Upvotes: 1

Related Questions