Reputation: 2020
Edit note: I am changing this question as I progress. Will continue to update.
I've upgraded my angular-meteor project (Meteor 1.2.1 + jade + ES6 js) to 1.3. The update was successful and everything works as before. I'd like to start using npm to install angular plugins as in:
meteor npm i <package>
As a first step, I've installed angular and angular-meteor:
meteor npm i angular --save
meteor npm i angular-meteor --save
then added:
import angular from 'angular';
import 'angular-meteor';
I've got a few missing packages errors on the server side, and fixed those by adding them using npm i <package> --save
Now I'm bumping against:
Error: Can't find npm module 'ecmascript'. Did you forget to call 'Npm.depends' in package.js within the 'modules-runtime' package?
W20160410-21:27:53.530(3)? (STDERR) at Object.Npm.require (/Users/user/work/myproj/.meteor/local/build/programs/server/boot.js:195:17)
Ideas?
Update
I assumed that adding ecmascript would fix it, but the error happens when it's installed. To be clear, I wasn't sure if to meteor add ecmascript
or to meteor npm i ecmascript
so tried both, separately and together. Nether fixed the above error.
That being said, meteor add ecmascript
actually got ES6 errors to stop, so I know it's there and active
2nd-Update (3 weeks later)
Waiting and retrying the update after a couple of weeks solved it: I've run Meteor update
then run the server, which in turn errored a few times about missing npm packages but after [meteor] npm install
of those, everything worked like a charm. Problem solved!
Upvotes: 4
Views: 774
Reputation: 282
Here are the steps that worked for me: 1. meteor update 2. review the packages that did not upgrade and upgraded them. Specifically the ones shown bellow:
The following top-level dependencies were not updated to the very latest version available: * angular 1.3.7 (1.3.10 is available) * angular-meteor-auth 0.2.2 (1.0.2_1 is available)
Newer versions of the following indirect dependencies are available: * angular-meteor-data 0.3.0 (1.3.10 is available) * angular-templates 1.0.1 (1.0.2 is available) * pbastowski:[email protected]
meteor npm init (and fill all details)
npm install --save angular angular-meteor
added the following import on app.js (main app file): import angular from 'angular'; (I added also import angularMeteor from 'angular-meteor';, but it does not seem to be necessary).
I received one strict-di error which I fixed by adding 'ngInject'; to that function (RoutingHandler).
That made my project work as before (no new npm packages, no extra imports).
Upvotes: 0
Reputation: 41750
In previous version of Meteor Angular we removed ecmascript
if you're migrating, add it back
meteor add ecmascript
Upvotes: 1