systemjs

Angular2 + webpack Uncaught ReferenceError: System is not defined

会有一股神秘感。 提交于 2019-12-12 13:32:49
问题 I've got the same issue like here: Why webpack bundled as 'System.register' I've build bundle.js with webpack and I am getting error: Uncaught ReferenceError: System is not defined my bundle.js inlcudes: System.register(['angular2/platform/browser', './app.component', 'rxjs/Rx'], function(exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; var browser_1, app_component_1; return { setters:[ function (browser_1_1) { browser_1 = browser_1_1; }, function (app

Angular 2 Release (2.0.1) Internet Explorer (SystemJS) Syntax Error

て烟熏妆下的殇ゞ 提交于 2019-12-12 12:42:35
问题 I have an Angular 2 Release (2.0.1) application that works fine in Chrome but throws the following error in Internet Explorer 11: Error: (SystemJS) Syntax error SyntaxError: Syntax error at Anonymous function (eval code:11:1) at Anonymous function (eval code:1:31) at eval code (eval code:1:2) Evaluating http://localhost:56159/areas/dashboard/modules/app.module.js Evaluating http://localhost:56159/areas/dashboard/dashboard.js Error loading http://localhost:56159/areas/dashboard/dashboard.js {

System.js doesn't display full stack trace

佐手、 提交于 2019-12-12 10:54:49
问题 I'm using System.js to load modules written in TypeScript. System.js wraps my original code in a function, therefore when I have an error in my code and I try to see it in Chrome developer tool, clicking on the error just brings me to the first line of the JavaScript file in which there's a declaration of a wrapping function that System.js has added, instead of the correct line in the original TypeScript file. Usually this is not a problem because System.js adds its own stack trace to the end

SystemJs Ignores Angular Dependency Bundle

谁说我不能喝 提交于 2019-12-12 05:59:29
问题 I am trying to get my angular application to the point where it is ready for distribution and I have managed to create 2 bundles, one for my angular application and one for my dependencies ( which include the angular framework and the rxjs framework ). I am using systemjs builder to do the bundling and using gulp to run the builder. Both bundles are produced and my custom bundle (which contains my code) is loaded by the front end but the vendor/dependency bundle is ignored and the

Node.js module lookup in Electron+Angular 2 & TypeScript application

余生长醉 提交于 2019-12-12 04:23:57
问题 I'm developing an Electron application with Angular 2. I followed this tutorial to initially setup the environment. My setup is a bit more complicated but in general is very similar. tsconfig.json : { "compilerOptions": { "target": "es5", "module": "commonjs", "moduleResolution": "node", "sourceMap": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "removeComments": false, "noImplicitAny": false }, "exclude": [ "node_modules", "app/node_modules", "dist" ] } systemjs.config

(SystemJS) module is not defined

别来无恙 提交于 2019-12-12 03:42:15
问题 I am getting this error when trying to load angular2 page: https://postimg.org/image/meg0l2znn/ My index.html <!DOCTYPE html> <html> <head> <title>Reloyalty Administration Dashboard</title> <!-- Viewport mobile tag for sensible mobile support --> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <link rel="icon" href="/favicon.ico"> <!-- For Angular2 Routing --> <base href="/"> <!-- Common Scripts--> <script src="/common/js/jquery-1.11.3.min.js"></script> <

VS2015 + TypeScript + Cordova + Angular2 + SystemJS

主宰稳场 提交于 2019-12-12 03:18:54
问题 I'm having problem with systemJS loading external modules. I created a small sample project for VS2015. You can download the code here https://github.com/dbiele/TypeScript-Cordova-SystemJS When I build the project and view in Ripple or BrowserSync I get the following error: xhr_proxy . It looks like System is looking for the external file animate.js on registry.jspm.io when it should be finding it on the localhost . Any thoughts? The code in GitHub is really basic. Note: I don't think this is

Angular 2 cannot find module d3-cloud

泪湿孤枕 提交于 2019-12-12 01:37:13
问题 For my angular 2 app with typescript, Im using systemjs for modules and grunt for build In systemJsconfig file Im loading map :{ ..... 'd3': 'npm:d3/build/d3.js', 'd3-cloud' : 'npm:d3-cloud', } In my component: importing the d3 and d3-cloud import * as D3 from 'd3'; import * as cloud from 'd3-cloud'; D3 is working fine but d3 cloud is not loading. When I build using grund, it throws compile time error Cannot find Module 'd3-cloud' Package.json: ..... "d3": "^4.2.6", "d3-cloud": "^1.2.1", ....

Angular and ES6: Karma Testing with SystemJS

雨燕双飞 提交于 2019-12-12 00:25:32
问题 Afternoon all, I have a MEAN stack app that I am developing tests for. The Angular code is written using ES6 so I have been trying to configure Karma and SystemJS with Babel as the transpiler to run my tests. Currently, when I karma start karma.conf.js the browser fires up, hangs—as in I cannot click debug or anything else—, and then the browser closes with the console error: Uncaught TypeError: Cannot set property 'mock' of undefined. The last line before this is DEBUG [web-server]: serving

If a module exported as node.js export module can we import it using systemjs import method

落爺英雄遲暮 提交于 2019-12-11 23:18:15
问题 In node project we import a module using require keyword, can we import same module using import {} from '' in angular2 project, provided that d.ts is not avaliable? For example can I use this library in my angular2 project https://github.com/basarat/typescript-collections/issues/new 回答1: Yes, you can. But you have to use only the ES6 syntax import / export . For Node.js, you can compile the code using modules format CommonJS or UMD. Here is a tutorial on how to use TypeScript with SystemJS.