{"action":"created","issue":{"url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize/issues/115","repository_url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize","labels_url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize/issues/115/labels{/name}","comments_url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize/issues/115/comments","events_url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize/issues/115/events","html_url":"https://github.com/InfomediaLtd/angular2-materialize/issues/115","id":179125303,"number":115,"title":"(SystemJS) Multiple anonymous defines in module","user":{"login":"MrSnappingTurtle","id":8148243,"avatar_url":"https://avatars.githubusercontent.com/u/8148243?v=3","gravatar_id":"","url":"https://api.github.com/users/MrSnappingTurtle","html_url":"https://github.com/MrSnappingTurtle","followers_url":"https://api.github.com/users/MrSnappingTurtle/followers","following_url":"https://api.github.com/users/MrSnappingTurtle/following{/other_user}","gists_url":"https://api.github.com/users/MrSnappingTurtle/gists{/gist_id}","starred_url":"https://api.github.com/users/MrSnappingTurtle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrSnappingTurtle/subscriptions","organizations_url":"https://api.github.com/users/MrSnappingTurtle/orgs","repos_url":"https://api.github.com/users/MrSnappingTurtle/repos","events_url":"https://api.github.com/users/MrSnappingTurtle/events{/privacy}","received_events_url":"https://api.github.com/users/MrSnappingTurtle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-26T02:09:44Z","updated_at":"2016-10-18T12:37:50Z","closed_at":null,"body":"Hello,\r\n\r\nI am getting the following error:\r\n\r\n![error](https://cloud.githubusercontent.com/assets/8148243/18820162/136c0d44-8350-11e6-8f56-2c91b82424e2.PNG)\r\n\r\nThe weird thing is that my project was working earlier. I build my project into a separate directory so I have to copy over the required node modules. Before, I wasn't preserving the folder structure so all the files were dumped into a `build/libs/` directory. I now adjusted it so that it goes into the proper structure (e.g. `build/node_modules/materialize-css/...` or `build/node_modules/@angular/...`). This change however, started triggering the error above. I have seen #18 but I don't see any differences between what I am doing and the solution mentioned there.\r\n\r\nMy setup:\r\n\r\n* Angular 2\r\n* SystemJS\r\n* Electron (I don't think this matters, though)\r\n\r\n`app.html`\r\n\r\n```html\r\n...\r\n<title>Carrots</title>\r\n    <meta charset=\"UTF-8\">\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\r\n    <base href=\"../../../\">\r\n\r\n    <script type=\"text/javascript\" src=\"node_modules/jquery/dist/jquery.min.js\"></script>\r\n\r\n    <!-- Materialize -->\r\n    <link type=\"text/css\" rel=\"stylesheet\" href=\"node_modules/materialize-css/dist/css/materialize.min.css\" media=\"screen,projection\" />\r\n    <script src=\"node_modules/hammerjs/hammer.min.js\"></script>\r\n    <script src=\"node_modules/materialize-css/dist/js/materialize.min.js\"></script>\r\n    <link href=\"./app/components/fonts/fonts.css\" rel=\"stylesheet\">\r\n\r\n    <script src=\"node_modules/zone.js/dist/zone.js\"></script>\r\n    <script src=\"node_modules/reflect-metadata/Reflect.js\"></script>\r\n    <script src=\"node_modules/systemjs/dist/system.src.js\"></script>\r\n\r\n    <script src=\"systemjs.config.js\"></script>\r\n    <script>\r\n      System.import('app').catch(function(err){ console.error(err); });\r\n    </script>\r\n    <link rel=\"stylesheet\" ype=\"text/css\" href=\"app/layouts/app/app.css\" />\r\n  </head>\r\n\r\n  <body>\r\n    <my-app>\r\n      ...\r\n```\r\n\r\n`systemjs.config.js`\r\n```js\r\n(function (global) {\r\n  System.config({\r\n    paths: {\r\n      // paths serve as alias\r\n      'npm:': 'node_modules/'\r\n    },\r\n    // map tells the System loader where to look for things\r\n    map: {\r\n      // our app is within the app folder\r\n      app: 'app',\r\n\r\n      // angular bundles\r\n      '@angular/core': 'npm:@angular/core/bundles/core.umd.js',\r\n      '@angular/common': 'npm:@angular/common/bundles/common.umd.js',\r\n      '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',\r\n      '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',\r\n      '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',\r\n      '@angular/http': 'npm:@angular/http/bundles/http.umd.js',\r\n      '@angular/router': 'npm:@angular/router/bundles/router.umd.js',\r\n      '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',\r\n\r\n      // other libraries\r\n      'rxjs': 'npm:rxjs',\r\n\r\n      // Materialize\r\n      'materialize-css': 'npm:materialize-css',\r\n      'angular2-materialize': 'npm:angular2-materialize',\r\n      'materialize': 'npm:angular2-materialize'\r\n    },\r\n    // packages tells the System loader how to load when no filename and/or no extension\r\n    packages: {\r\n      app: {\r\n        main: './main.js',\r\n        defaultExtension: 'js'\r\n      },\r\n      rxjs: {\r\n        defaultExtension: 'js'\r\n      },\r\n      'materialize': {\r\n        main: 'dist/materialize-directive',\r\n        defaultExtension: 'js'\r\n      },\r\n      'materialize-css': {\r\n        main: 'dist/js/materialize'\r\n      }\r\n    }\r\n  })\r\n})(this)\r\n```\r\n\r\nStructure:\r\n![structure](https://cloud.githubusercontent.com/assets/8148243/18820525/195f3d0e-8353-11e6-8c4b-f6a1f1d58304.PNG)\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize/issues/comments/254494167","html_url":"https://github.com/InfomediaLtd/angular2-materialize/issues/115#issuecomment-254494167","issue_url":"https://api.github.com/repos/InfomediaLtd/angular2-materialize/issues/115","id":254494167,"user":{"login":"MrSnappingTurtle","id":8148243,"avatar_url":"https://avatars.githubusercontent.com/u/8148243?v=3","gravatar_id":"","url":"https://api.github.com/users/MrSnappingTurtle","html_url":"https://github.com/MrSnappingTurtle","followers_url":"https://api.github.com/users/MrSnappingTurtle/followers","following_url":"https://api.github.com/users/MrSnappingTurtle/following{/other_user}","gists_url":"https://api.github.com/users/MrSnappingTurtle/gists{/gist_id}","starred_url":"https://api.github.com/users/MrSnappingTurtle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrSnappingTurtle/subscriptions","organizations_url":"https://api.github.com/users/MrSnappingTurtle/orgs","repos_url":"https://api.github.com/users/MrSnappingTurtle/repos","events_url":"https://api.github.com/users/MrSnappingTurtle/events{/privacy}","received_events_url":"https://api.github.com/users/MrSnappingTurtle/received_events","type":"User","site_admin":false},"created_at":"2016-10-18T12:37:50Z","updated_at":"2016-10-18T12:37:50Z","body":"@Bucabug I've been busy so I haven't had time to work on side projects. I'll try to figure it out this weekend. I'll update when I find something."}}
{"actor":{"display_login":"MrSnappingTurtle"}}