Bruno Tavares Bruno Tavares - 2 months ago 38
TypeScript Question

Meteor-Angular2 - ReferenceError: System is not defined

Since I tried upgraded my project to support the last Angular2 router I completely broke my app.h

Nothing went smoot and it's been an amazing journey through all errors and problems that I have face. I managed to solve them all except this one.

I would be very appreciated if someone could give me a hint on what to do because I ran out of possibilities.

W20160905-02:19:05.541(1)? (STDERR) /home/workspace/.meteor/packages/meteor-tool/.1.4.1_1.crqcrg++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
W20160905-02:19:05.652(1)? (STDERR) throw(ex);
W20160905-02:19:05.652(1)? (STDERR) ^
W20160905-02:19:05.653(1)? (STDERR)
W20160905-02:19:05.653(1)? (STDERR) ReferenceError: System is not defined
W20160905-02:19:05.653(1)? (STDERR) at systemjs.config.js:40:26
W20160905-02:19:05.654(1)? (STDERR) at meteorInstall.systemjs.config.js (systemjs.config.js:5:1)
W20160905-02:19:05.654(1)? (STDERR) at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
W20160905-02:19:05.655(1)? (STDERR) at require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)
W20160905-02:19:05.655(1)? (STDERR) at server/main.ts:11:4
W20160905-02:19:05.655(1)? (STDERR) at /home/workspace/meteor-angular/test-app-v1.0.3/.meteor/local/build/programs/server/boot.js:292:10
W20160905-02:19:05.656(1)? (STDERR) at Array.forEach (native)
W20160905-02:19:05.656(1)? (STDERR) at Function._.each._.forEach (/home/workspace/.meteor/packages/meteor-tool/.1.4.1_1.crqcrg++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20160905-02:19:05.656(1)? (STDERR) at /home/workspace/meteor-angular/test-app-v1.0.3/.meteor/local/build/programs/server/boot.js:128:5
=> Exited with code: 1

Answer

I'm just leaving here my solution, it may help someone else.

I wasn't able to find what was causing the problem, but I created a new meteor project, copied all the project files into it and installed the project dependencies with:

meteor npm install

Maybe it had something to do with a broken package.

Comments