Skip to content
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

Problem referencing exported class from spec #45

Closed
kristianmandrup opened this issue Mar 8, 2015 · 1 comment
Closed

Problem referencing exported class from spec #45

kristianmandrup opened this issue Mar 8, 2015 · 1 comment

Comments

@kristianmandrup
Copy link

How do I references an exported class correctly?

I have this config:

// karma.conf.js

    basePath: '',
    ...
    jspm: {
      loadFiles: ['src/**/*.js', 'test/**/*.js']
    },

...
// test/bindtable.spec.js
import {BindTable} from '../src/bindtable';
...
// src/bindtable.js
import {Record} from './record';
import {Table}  from './table'; 

// re-export
export {Bindable} from './bindable';

export function createBindTable (options) {
  new BindTable(options);
}

export class BindTable {

But I keep getting this error: WARN [web-server]: 404: /base/bindtable.js
Is it because I fuck up my imports/exports before I get to export the BindTable class?

$ karma start
WARN [karma]: Port 9876 in use
INFO [karma]: Karma v0.12.31 server started at http://localhost:9877/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 41.0.2272 (Mac OS X 10.10.2)]: Connected on socket kyKTwj32lmkUsoE64jVj with id 69984753
WARN [web-server]: 404: /base/bindtable.js
Chrome 41.0.2272 (Mac OS X 10.10.2): Executed 0 of 0 ERROR (0.003 secs / 0 secs)

Even if I reference another file, it still keeps warning about this import of bindtable?

Is it because of this seeting in package.json ?

"main": "src/bindtable.js",

I'm totally lost here https://github.com/kristianmandrup/aurelia-rethink-bindtable

@kristianmandrup kristianmandrup changed the title Problem referencing module from spec Problem referencing exported class from spec Mar 8, 2015
@kristianmandrup
Copy link
Author

Due to this bad import without relative prefix indicator './' n another file :P Damn!

import {BindTable} from './bindtable';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant