Closed frankwallis closed 9 years ago
@frankwallis I'd be interested to know how you're driving the build here? Is it via jspm bundle-sfx
on the command-line? If so can you confirm which version of SystemJS you are seeing in jspm_packages?
Basically this issue will only happen if for some reason SystemJS is not detecting the node environment, and having System._nodeRequire
set.
I'm calling systemjs-builder from a gulp task, see here
I would suggest adding a console.log to check if builder.loader._nodeRequire
is defined just before https://github.com/frankwallis/tower/blob/master/tasks/bundle/bundle-builder.js#L32.
It would be good to know how it's not being set, so help tracking it down appreciated.
It was caused by calling reset()
multiple times - it gets called in the Builder constructor and I was calling it myself. When I took out the second call it started working ok. I have submitted a patch for the actual problem.
@guybedford why is this occurring? I'm seeing this error when using http library and wepback to bundle up my node code. Is there a check in the http library to use XMLHttpRequest if it thinks its in a browser environment?
I know this isn't related to system.js but any insight into this would be awesome!
Hi - I am getting this error when doing an SFX bundle in 0.10.5, if I downgrade to 0.10.4 then everything works ok again: