-
Notifications
You must be signed in to change notification settings - Fork 50
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
404 when using import #155
Comments
I'm currently having what looks to be the same issue, but with TypeScript. |
This looks like something you could fix with a proxy configuration in karma like this:
Provided that |
I've been through many permutations for the config file, including using proxies, but keep getting the same issue. here's my config file module.exports = function(config) {
config.set({
//logLevel: config.LOG_DEBUG,
frameworks: ["jspm", "jasmine"],
reporters: ["progress"],
browsers: ["PhantomJS"],
// files: [
// { pattern: "test/*.spec.ts", included: true },
// { pattern: "dist/**/*.js", included: false, served: true }
// ],
proxies: {
"jspm_packages/": "base/jspm_packages/",
"test/": "base/test/",
"src/": "base/src/"
},
jspm: {
config: "./config.js",
loadFiles: [
"test/**/*.ts"
],
serveFiles: [
"jspm_packages/**/*.js",
"src/**/*.ts"
],
paths: {
"aurelia-service-generator/*": "dist/*"
}
}//,
// preprocessors: {
// "test/**/*.ts": ["typescript"]
// },
// typescriptPreprocessor: {
// options: {
// noResolve: true,
// module: 'amd'
// },
// transformPath: function(path) {
// return path.replace(/\.ts$/, '.js');
// }
// }
});
} And here's my Systemjs config file System.config({
//defaultJSExtensions: true,
transpiler: "typescript",
paths: {
"github:*": "jspm_packages/github/*",
"npm:*": "jspm_packages/npm/*"
},
map: {
"typescript": "npm:[email protected]",
"github:jspm/[email protected]": {
"os-browserify": "npm:[email protected]"
},
"npm:[email protected]": {
"os": "github:jspm/[email protected]"
},
"npm:[email protected]": {
"os": "github:jspm/[email protected]"
}
}
}); And just in case, here's the spec I'm trying to load import { TypeScriptServiceBuilder } from "../src/construction/typeScript/TypeScriptServiceBuilder";
describe("TypeScriptServiceBuilder", function() {
it("exists", function() {
expect(TypeScriptServiceBuilder).toBeTruthy();
});
}); Aaaannnnndddddd here's a (slightly abridged, emptied node_modules) copy of my directory structure
|
@sergei-maertens just in case, ping. |
I have no quick ideas, sorry :(
|
Perhaps you need to install plugin-babel:
|
@FredLoney I'm using TypeScript instead of Babel, and it's set up to use it in the system config and it exists in the jspm_packages folder |
This might be karma-jspm/jspm interaction weirdness. I use typescript as well, but my karma-jspm fails on a missing traceur library. When I add it, the test runs. jspm checks the transpiler name against a list of known transpilers and loads libraries accordingly. traceur is the first in the list and babel is the last--and default--in the list. In my situation, this is the only place in the entire app that could potentially request a traceur library. It could be that jspm is not detecting your transpiler name correctly and falls through to babel. If so, the first library jspm would request is babel-core. |
Hi, I'm trying to use
karma-jspm
, after your last release I do not have thetoo many open file
so I can go on.Now I'm facing a new issue, I read the #91, but that's not my case, my
jspm.config.js
has an emptybaseURL
When I run my es5 tests it fails with:
Which is fine since I didn't
import
it (my app is with AngularJS)So when I try to:
I get this error:
Does anyone have any tips or idea, what I'm missing here?
The text was updated successfully, but these errors were encountered: