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
browser unable to load latest node version #1824
Comments
Synchronous requests aren’t really possible in the browser (they’re possible but deprecated). Even in node, I’d recommend only doing requests asynchronously. |
There must be workaround to solve this issue, please try at your end and let me if there's any possibilities? |
Which version of sync-request are you using? I can't reproduce this with the most recent version. |
had a detailed discussion with @ForbesLindesay on this topic here: ForbesLindesay/sync-request#93 I'm able to figure out the exact issue and im pretty sure about this: |
@abidrana7 I think you will start to get better help if you correctly identify the issue you are experiencing. The problem you are having is that the spawn-sync does provide a browser implementation (although @ljharb is quite right that you shouldn't use it in any real applications) so it should work, but there is something very strange about your setup. Maybe you've set the In any case, I strongly recommend that you stop posing your question as a problem of not being able to load node in the browser. |
@ForbesLindesay apologies, if the title of my each question is disturb you at all. My intention was to just logged an issue of what I got an error message. Can you give me any idea on who to use |
Can you share how you are calling browserify? If I have a var sr = require('sync-request') Doing |
I'm using |
A code snippet showing how you are using it and with which configuration would be helpful. |
this is my grunt file's content: `'use strict'; var serverRootUri = 'http://127.0.0.1:8000'; module.exports = function(grunt) {
}; |
You cannot get That grunt file is too large for me to want to get into unpicking and debugging what's going wrong. My advice would be to start with the simplest setup you can possibly have to demonstrate the problem. i.e. use grunt-browserify (with no other grunt modules) to build a script that just contains If that still errors, you'll be able to post a really succinct example of what fails, and it's much more likely that someone will have time to help you figure out what's going wrong. |
i'm running my Mocha scripts via Browserify in browser but got the following error in browser's console:
"Uncaught Error: Sync-request requires node version 0.12 or later. If you need to use it with an older version of node
you can
npm install sync-request@2.2.0
, which was the last version to support older versions of node."However installed nodejs's version on machine is `v9.5.0'
The text was updated successfully, but these errors were encountered: