question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with URL in node version 10

See original GitHub issue

I’m facing up this problem in node version 10 and it can be solved like this https://stackoverflow.com/a/52794744

Do we have any update on it. Thank you!

TypeError: _url.URL is not a constructor at OnePay.js:132 at new Promise (<anonymous>) at OnePayInternational.buildCheckoutUrl (OnePay.js:77) at ConfirmPaymentPage._this._redirectToPayemntGateway (ConfirmPaymentPage.js:33) at HTMLUnknownElement.callCallback (react-dom.development.js:147) at Object.invokeGuardedCallbackDev (react-dom.development.js:196) at invokeGuardedCallback (react-dom.development.js:250) at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:265) at executeDispatch (react-dom.development.js:571) at executeDispatchesInOrder (react-dom.development.js:596) at executeDispatchesAndRelease (react-dom.development.js:695) at executeDispatchesAndReleaseTopLevel (react-dom.development.js:704) at forEachAccumulated (react-dom.development.js:676) at runEventsInBatch (react-dom.development.js:844) at runExtractedEventsInBatch (react-dom.development.js:852) at handleTopLevel (react-dom.development.js:5030) at batchedUpdates$1 (react-dom.development.js:21425) at batchedUpdates (react-dom.development.js:2247) at dispatchEvent (react-dom.development.js:5110) at react-dom.development.js:21482 at Object.unstable_runWithPriority (scheduler.development.js:255) at interactiveUpdates$1 (react-dom.development.js:21481) at interactiveUpdates (react-dom.development.js:2268) at dispatchInteractiveEvent (react-dom.development.js:5086)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tttt-conancommented, Jul 5, 2019

I think I know what’s wrong here. In the error log, I saw you were calling it from React, which is the front-end side. This package is supposed to be used on the back-end side. You have to write some routes on your back-end to handle the requests. You can check our example here:

https://github.com/naustudio/node-vn-payments/tree/master/example

0reactions
hoantran-itcommented, Jul 5, 2019

Oh I suppose this lib for react front-end side, sorry, let me check. Thank you! @tttt-conan

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.js Error: Cannot GET/ from running the url on the web ...
Problem Statement: On running a Node.js application URL on the web browser it throws the following error: Cannot GET/.
Read more >
Error npm is known not to run on Node.js v10.24.1 and how to ...
I happen to work on a project that builds on node 10 as well. ... curl -qSsL -o npm.tgz "$url" bin/npm-cli.js install -gf...
Read more >
http.request with URL object gives type error #36745 - GitHub
For info, url.parse is deprecated since Node.js v11.0.0 in favor of the WHATWG URL – available on the global scope since Node.js v10.0.0 ......
Read more >
URL | Node.js v19.3.0 Documentation
A URL string is a structured string containing multiple meaningful components. When parsed, a URL object is returned containing properties for each of...
Read more >
Common errors | npm Docs
Common errors · Errors · Broken npm installation · Random errors · No compatible version found · Permissions errors · Error: ENOENT, stat...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found