browser unable to load latest node version
See original GitHub issuei’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’
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
browser unable to load latest node version #19747 - GitHub
Version : v9.5.0 Platform: Windows 64bit Subsystem: i'm running my Mocha scripts via Browserify in browser but got the following error in ...
Read more >correctly downloaded node.js but still unable to install browser ...
This is simply a message telling you that fsevents wasn't installed because it's an optional package, but browser-events was installed.
Read more >How to Easily Update Node.js to the Latest Version
Another way of updating your Node.js on macOS and Windows is to go to the official download site and install the most recent...
Read more >How to Fix "Unable to load Node-API Library" with Cypress on ...
Here's how to fix the "Unable to Load Node-API Library" error that can come up when trying to use Prisma in Cypress tasks...
Read more >Node.js Error: Cannot GET/ from running the url on the web ...
Last Updated : 04 Aug, 2022 ... Problem Statement: On running a Node.js application URL on the web browser it throws the following...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub 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.
You cannot get
spawn-sync
to work in the browser. That is literally impossible. What you can do is usesync-request
in the browser, because it provides a separate implementation specifically tailored for the browser.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
var sr = require('sync-request');sr('GET', '/');
and see if you can get the resulting script to run without error.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.