Comments (22)
If you edit [email protected]/lib/*.js
and manually replace require('stream')
with require('npm:[email protected]/index')
that will get this to work.
In terms of a fix, I can add an override to make this work, but it won't be ideal as it involves locking down the version of stream. Will put some thought to a better solution.
from registry.
Note there is a maximum stack sized reached error in the browser, although this is non-critical. Also working on a mid term fix for that.
from registry.
Thanks for the quick reply. Now I'm getting a whole bunch of new errors w/ mime-types
after the maximum stack errors.
http:/localhost:8000/jspm_packages/npm/[email protected]/types/mime.types
index.js:9 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
and
GET http://localhost:8000/localhost:8000/jspm_packages/npm/[email protected]/types/mime.types 404 (File not found) index.js:19
because the passed URL is missing the double slash.
from registry.
@psolbach do you have a code example to cause that error?
from registry.
But still the same import Request from 'superagent';
.
The call is in [email protected]/index.js
invoked by Mime.load()
.
Nothing installed except Vue, Superagent.
Stack-Trace:
exports.readFileSync (index.js:9)
Mime.load (mime.js:26)
(anonymous function) (mime.js:44)
(anonymous function) (mime.js:52)
(anonymous function) (mime.js:54)
doEval (system.src.js:2255)
__eval (system.src.js:2221)
a (system.src.js:335)
$__global.upgradeSystemLoader.e.instantiate.cjs.n.metadata.format.n.metadata.execute (system.src.js:1159)
f (system.src.js:667)
c (system.src.js:636)
(anonymous function) (system.src.js:671)
(anonymous function) ([email protected]:1)
(anonymous function) ([email protected]:2)
doEval (system.src.js:2255)
__eval (system.src.js:2221)
a (system.src.js:335)
$__global.upgradeSystemLoader.e.instantiate.cjs.n.metadata.format.n.metadata.execute (system.src.js:1159)
f (system.src.js:667)
c (system.src.js:636)
(anonymous function) (system.src.js:671)
(anonymous function) (form_data.js:10)
(anonymous function) (form_data.js:208)
(anonymous function) (form_data.js:210)
doEval (system.src.js:2255)
__eval (system.src.js:2221)
a (system.src.js:335)
$__global.upgradeSystemLoader.e.instantiate.cjs.n.metadata.format.n.metadata.execute (system.src.js:1159)
f (system.src.js:667)
c (system.src.js:636)
(anonymous function) (system.src.js:671)
(anonymous function) ([email protected]:1)
(anonymous function) ([email protected]:2)
doEval (system.src.js:2255)
__eval (system.src.js:2221)
a (system.src.js:335)
$__global.upgradeSystemLoader.e.instantiate.cjs.n.metadata.format.n.metadata.execute (system.src.js:1159)
f (system.src.js:667)
c (system.src.js:636)
(anonymous function) (system.src.js:671)
(anonymous function) (index.js:5)
(anonymous function) (index.js:494)
(anonymous function) (index.js:496)
doEval (system.src.js:2255)
__eval (system.src.js:2221)
a (system.src.js:335)
$__global.upgradeSystemLoader.e.instantiate.cjs.n.metadata.format.n.metadata.execute (system.src.js:1159)
f (system.src.js:667)
c (system.src.js:636)
(anonymous function) (system.src.js:671)
(anonymous function) ([email protected]:1)
(anonymous function) ([email protected]:2)
doEval (system.src.js:2255)
__eval (system.src.js:2221)
a (system.src.js:335)
$__global.upgradeSystemLoader.e.instantiate.cjs.n.metadata.format.n.metadata.execute (system.src.js:1159)
f (system.src.js:667)
l (system.src.js:530)
$__global.upgradeSystemLoader.e.instantiate.Promise.all.then.execute (system.src.js:841)
o (es6-module-loader.src.js:1878)
p (es6-module-loader.src.js:1926)
j (es6-module-loader.src.js:1700)
k (es6-module-loader.src.js:1748)
(anonymous function) (es6-module-loader.src.js:1574)
O (es6-module-loader.src.js:1177)
K (es6-module-loader.src.js:1136)
7.y.when (es6-module-loader.src.js:927)
7.v.run (es6-module-loader.src.js:818)
3.a._drain (es6-module-loader.src.js:97)
3.a.drain (es6-module-loader.src.js:62)
b (es6-module-loader.src.js:267)
from registry.
It was definitely working ok for me - which version of jspm are you using? I assume you're running in the browser?
from registry.
Version 0.13.4; in the Browser. It's literally the getting-started setup with the single jspm install npm:superagent
and subsequent import. Giving up for now :/
from registry.
I can mitigate the errors except Maximum stack size and Synchronous XMLHttpRequest on the main thread is deprecated
if I change the "baseURL" to "http:/" though. But that's a hack.
from registry.
@psolbach perhaps try jspm install npm:superagent -f
before doing those rewrites. I can definitely get everything to work except for the maximum call stack issue.
from registry.
Finally managed to replicate this - was running on files here which for some reason was not triggering the fs.readFileSync! Unfortunately don't have much more time to look into this myself right now, so will leave this up until there is more pressure.
from registry.
Hey thanks for your prompt help. Will try to isolate that rogue path as well.
from registry.
I'm having similar issues working with other HTTP libraries in the browser. I'm assuming they're related but would be glad to create new issues.
jspm install npm:react-promise
require ('react-promise')
Results in very similar errors as superagent.
jspm install npm:needle
jspm install npm:xml2js
(not declared a dependency but required)
require('needle')
Result:
Uncaught RangeError: Maximum call stack size exceeded.
XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/
from registry.
The specific issue is that for some reason these libraries are triggering the use of fs.readFileSync
in the browser, which they shouldn't be doing even in Browserify. Some kind of conditional path in the code would be leading to this code which should only run in Node happening in the browser, but I'm not sure what conditional that would be.
from registry.
FWIW, I had the same superagent problems with systemjs, and have tried axiom instead and it is working well so far... in reference to @activelogix comment that other http libs are having the same issue. Perhaps there is something there that helps uncover why one works and the other doesn't. Or for those trying to stay the jspm course, at least this helps point to an alternative to keep moving forward for now.
from registry.
i'm running into the same thing with a variety of ajax libs too (on windows)
from registry.
Please post the name of the lib as a separate issue in this repo. These bugs are valuable.
from registry.
Correction, I'm now using axios (https://github.com/mzabriskie/axios) as an AJAX lib without any issues thus far with SystemJS. It is also an isomorphic library, so just being isomorphic doesn't seem to be causing these issues... must be something specific superagent (and supposedly others) are doing.
from registry.
Fixed and working from #254, thanks to @danharper.
from registry.
Quoting the documentation: When loading modules from npm, the module format is treated as cjs
. Why do we have to specify the format explicitly?
from registry.
You're right - the registry and format property are not necessary in this override.
from registry.
My PR was originally pointing at GitHub so I added in format
and registry
, then changed it to use NPM. No harm though I guess.
from registry.
Course not! Just trying to get the hang of this.
from registry.
Related Issues (20)
- Difference between Jenkins and local build HOT 7
- Slow/flaky npm.jspm.io registry HOT 7
- intro.js overrides? HOT 1
- npm Debug package override not applying HOT 3
- some fetch errors while making ts bundle HOT 1
- Latest d3 breaks jspm install HOT 3
- registry CI failure caused by transitive dependency update
- GitLab endpoint? HOT 1
- I'm confused by the module format documentation in the wiki HOT 2
- Is there a way in my package.json to tell JSPM not to install a specific dependency? HOT 14
- Mapping a dependency to `@empty` changes the import path
- Bootstrap install fails HOT 5
- `jspm install` not outputting anything in Windows bash
- React Router Dom 404
- new HOT 1
- Question: how much can I use dev.jspm.io? HOT 2
- kasperlewau.github.io/registry is not found HOT 1
- Licensing information. Can this project make it explicit?
- @shopify/app-bridge-utils is missing all new versions for the last 9 months HOT 2
- Self-hosting JSPM? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from registry.