-
-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundling yields error source has multiple anonymous System.register calls. #1859
Comments
my App.js (TS generated) only has one System.register call I even tried to keep things to minimum with a simple app as:
and same error... I am using jspm 0.17.0-beta.14 |
What does your |
@born2net & @guybedford, I have created an example barebones project that will throw the error: https://github.com/jakeNiemiec/jspmsandbox jakeniemiec@Sat ~/RubymineProjects git clone git@github.com:jakeNiemiec/jspmsandbox.git
Cloning into 'jspmsandbox'...
remote: Counting objects: 15, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 15 (delta 1), reused 15 (delta 1), pack-reused 0
Receiving objects: 100% (15/15), done.
Resolving deltas: 100% (1/1), done.
Checking connectivity... done.
jakeniemiec@Sat ~/RubymineProjects cd jspmsandbox
jakeniemiec@Sat ~/RubymineProjects/jspmsandbox master npm i
jspmsandbox@1.0.0 /Users/jakeniemiec/RubymineProjects/jspmsandbox
├─┬ jspm@0.17.0-beta.16
#(long dep tree excluded)
└── typescript@1.8.10
npm WARN jspmsandbox@1.0.0 No description
npm WARN jspmsandbox@1.0.0 No repository field.
jakeniemiec@Sat ~/RubymineProjects/jspmsandbox master jspm i
Updating registry cache...
ok Installed dev dependency npm:os-browserify@^0.2.0 (0.2.1)
ok Installed dev dependency os to github:jspm/nodelibs-os@^0.2.0-alpha (0.2.0-alpha)
ok Installed dev dependency npm:typescript@^1.8.7 (1.8.10)
ok Installed dev dependency plugin-typescript to github:frankwallis/plugin-typescript@^4.0.16 (4.0.16)
Install tree has no forks.
Looking up loader files...
system-polyfills.js
system.js.map
system.js
system.src.js
system-polyfills.src.js
system-polyfills.js.map
Using loader versions:
systemjs@0.19.29
ok Loader files downloaded successfully
ok Install complete.
jakeniemiec@Sat ~/RubymineProjects/jspmsandbox master tsc
jakeniemiec@Sat ~/RubymineProjects/jspmsandbox master jspm bundle jspmsandbox
Building the bundle tree for jspmsandbox...
err Source jspmsandbox/jspmsandbox.js has multiple anonymous System.register calls. Files: import {test} from './otherfile'; This transpiles to: System.register([], function(exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
return {
setters:[],
execute: function() {
}
}
});
//# sourceMappingURL=jspmsandbox.js.map src/otherfile.ts export function test() {
return true;
} This transpiles to: System.register([], function(exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
function test() {
return true;
}
exports_1("test", test);
return {
setters:[],
execute: function() {
}
}
});
//# sourceMappingURL=otherfile.js.map 0.17.0-beta.16 #jspm -v (*will also happen on jspm@0.17.0-beta.17*)
Running against local jspm install.
3.9.2 #npm -v
Version 1.8.10 #tsc -v (typescript), this will also happen with typescript@next (typescript@1.9.0-dev.20160531-1.0) tsconfig.json {
"compilerOptions": {
"target": "ES5",
"module": "system",
"moduleResolution": "node",
"declaration": true,
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false,
"listFiles": false
},
"exclude": [
"node_modules",
"jspm_packages",
"dist",
"typings/*",
"typings/main",
"typings/main.d.ts"
]
} I hope this is enough info to diagnose the problem. |
Thanks for doing that...! |
and @guybedford you were asking about my app.js, it is just a clean js file, the problem is that System.Register is the file (the first line) AND it must appear somewhere in another file (not part of the project as it is the only file in my project) and so I would assume jspm seens the 2 System.registers |
rest of file is just my code... no other |
seems the bug was tracked down: |
Ultimately, it seems like something is wrong between plugin-typescript and jspm-cli //cc @frankwallis |
tx for clearing it out |
problem solved tx to @jakeNiemiec by changing the jspm.config.js.
so when using .js will not use a loader. |
- fixed the initialization of typescript projects by loading .ts files into plugin-typescipt instead of *.js files. This eventually resulted in the `err Source StudioDashboard/App.js has multiple anonymous System.register calls.` error when trying to bundle or build (jspm#1859). - If the user inputs a typescipt file for the main entry point the 'Select a transpiler' step will default to 'typescript' instead of 'babel'
- fixed the initialization of typescript projects by loading .ts files into plugin-typescipt instead of *.js files. This eventually resulted in the `err Source StudioDashboard/App.js has multiple anonymous System.register calls.` error when trying to bundle or build (jspm#1859). - If the user inputs a typescipt file for the main entry point the 'Select a transpiler' step will default to 'typescript' instead of 'babel'
- fixed the initialization of typescript projects by loading .ts files into plugin-typescipt instead of *.js files. This eventually resulted in the `err Source StudioDashboard/App.js has multiple anonymous System.register calls.` error when trying to bundle or build (jspm#1859). - If the user inputs a typescipt file for the main entry point the 'Select a transpiler' step will default to 'typescript' instead of 'babel'
- fixed the initialization of typescript projects by loading .ts files into plugin-typescipt instead of *.js files. This eventually resulted in the `err Source StudioDashboard/App.js has multiple anonymous System.register calls.` error when trying to bundle or build (jspm#1859). - If the user inputs a typescipt file for the main entry point the 'Select a transpiler' step will default to 'typescript' instead of 'babel'
- fixed the initialization of typescript projects by loading .ts files into plugin-typescipt instead of *.js files. This eventually resulted in the `err Source StudioDashboard/App.js has multiple anonymous System.register calls.` error when trying to bundle or build (jspm#1859). - If the user inputs a typescipt file for the main entry point the 'Select a transpiler' step will default to 'typescript' instead of 'babel'
[0.17.0-beta-17] Fixed typescipt support for `jspm init` (fixes #1859)
- fixed the initialization of typescript projects by loading .ts files into plugin-typescipt instead of *.js files. This eventually resulted in the `err Source StudioDashboard/App.js has multiple anonymous System.register calls.` error when trying to bundle or build (#1859). - If the user inputs a typescipt file for the main entry point the 'Select a transpiler' step will default to 'typescript' instead of 'babel'
- fixed the initialization of typescript projects by loading .ts files into plugin-typescipt instead of *.js files. This eventually resulted in the `err Source StudioDashboard/App.js has multiple anonymous System.register calls.` error when trying to bundle or build (#1859). - If the user inputs a typescipt file for the main entry point the 'Select a transpiler' step will default to 'typescript' instead of 'babel'
I switched over from cjs to system and now when I run:
I get
this is my config:
https://github.com/born2net/studioDashboard/blob/hot-reload/jspm.config.js
and project:
https://github.com/born2net/studioDashboard/tree/hot-reload
any suggestions?
tx
Sean
The text was updated successfully, but these errors were encountered: