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

Can't use sql.js #1108

Closed
screendriver opened this issue Sep 9, 2015 · 5 comments
Closed

Can't use sql.js #1108

screendriver opened this issue Sep 9, 2015 · 5 comments

Comments

@screendriver
Copy link

I want to use sql.js and did a jspm install npm:sql.js. Installation ran without errors. At runtime my browser error console tells me

Error: XHR error (404 Not Found) loading http://localhost:3000/ws.js
    Error loading http://localhost:3000/ws.js as "ws" from http://localhost:3000/jspm_packages/npm/sql.js@0.2.21/js/sql.js

Unfortunately I don't know what this ws.js is for.

@chauthai
Copy link

chauthai commented Sep 9, 2015

ws a node module not available in the browser.
Take a look at this issue in the sql.js repo.

@screendriver
Copy link
Author

Ok thank you. It seems that this is something like issue #1100 that I posted recently where a library (sass.js) reloads dynamically dependencies without requiring / importing it.

@guybedford
Copy link
Member

You can null out that dependency on install via jspm install npm:sql.js -o "{map: {ws: '@empty'}}". If that works, you can check that into the registry under package-overrides/npm/sql.js@x.y.z.json so others get the fix as well, or send a PR to sql.js to include the configuration in the original package.json file.

@screendriver
Copy link
Author

In the first step the error is gone. But after that I get a

uncaught exception: uncaught exception: TypeError: process.platform is undefined
    Evaluating http://localhost:3002/jspm_packages/npm/sql.js@0.2.21/js/sql.js
    Evaluating http://localhost:3002/jspm_packages/npm/sql.js@0.2.21.js
    Error loading http://localhost:3002/index.js

I believe this whole thing can only be fixed in sql.js directly like described here https://github.com/kripken/sql.js/issues/112

@guybedford
Copy link
Member

Sure, please post an issue at the jspm registry if you need further help with these overrides.

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

3 participants