Help with angular-meteor ngclipboard installation, question posted on Stackoverflow


#1

http://stackoverflow.com/questions/38250816/replacing-ngclipboard-with-npm-version-in-meteor-project-causes-warning-tried

Any ideas/suggestions would be appreciated. Cheers!


#2

Is it possible that you have some version of angular installed via a smart package (atmosphere)? Possibly as a dependency of a different package?


#3

That’s an interesting direction. Indeed I had some angular-* atmosphere packages installed. @lightpriest Following your suggestion, I went ahead and replaced them with their npm equivalents. For details, see the stackoverflow question: I’ve posted there my .meteor/packages and package.json .

Unfortunately replacing atmosphere angular packages with their npm versions didn’t solve it. I’m still getting the warning about trying to load angular more then once.

I’ll point out that pbastowski:angular-babel and angular-templates are the only angular-related atmosphere packages which remain in my .meteor/packages. To my understanding this is not a problem (at least, according to https://www.npmjs.com/package/angular-meteor )


#4

From the .meteor/packages list I see that you have ionic2 from atmosphere. It depends on angular from atmosphere. Replace it with it’s npm version and I think you should be fine.


#5

Yes thanks. Indeed ionic is the package which pulls in angular. I tried to meteor remove it and npm install it, problem is that npm installs ionic ^1.7.16 while the project is setup with the driftyco:ionic@1.2.4 (from atmosphere). As expected that’s no good bc the resulting UI is all messed up.

As such I tried installing my exact version of ionic using:

$ npm i ionic@1.2.4

and then in my client side app.js

import 'ionic'

(the same way I import other angular-* modules)
Problem now is that on the browser’s console I get:

install.js:85Uncaught Error: Cannot find module 'ionic'

But, it’s definitely there:

$ ls -1 node_modules/ionic
CHANGELOG.md
LICENSE
README.md
bin
lib
package.json

According to the thrown stack, fileResolve fails to resolve ionic:

    function require(id) {
      var result = fileResolve(file, id);

(no index.js and no ‘main’ section in ionic@1.2.4 package.json file?)

Any idea why, and how to get the import ionic statement to work?


#6

k so I found out there’s a rather special way to add ionic to the project

Following those steps, I managed to start the import going but then it broke at a point which involved babel. This task proved to be much more difficult then expected. I have to back-shelve it for now…