dappforce / subsocial-web-app

Web UI for decentralized social networks and marketplaces. Features: blogs, posts, comments, likes, reputation, feed and notifications. Built with Next.js, React and Ant Design.
http://subsocial.network
GNU General Public License v3.0
95 stars 27 forks source link

ReferenceError: URL is not defined #431

Open alinayani opened 3 years ago

alinayani commented 3 years ago

I run the following commands line by line


  1. sudo git clone git@github.com:dappforce/dappforce-subsocial-ui.git
  2. cd dappforce-subsocial-ui
  3. sudo cp subsocial-betanet.env .env (didn't made any changes in .env file)
  4. sudo yarn (this command gave the error "The engine “node” is incompatible with this module" so i resolved it by running this command "sudo yarn config set ignore-engines true" and it run with some warnings only )
  5. sudo ./run-dev.sh

the fifth command failed with below error


UnhandledPromiseRejectionWarning: ReferenceError: URL is not defined at Object. (/dappforce-subsocial-ui/node_modules/next/dist/next-server/lib/router/utils/parse-relative-url.js:1:235) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object. (/dappforce-subsocial-ui/node_modules/next/dist/next-server/lib/router/utils/prepare-destination.js:1:199) at Module._compile (module.js:652:30) (node:8170) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)


can anyoone help me how can i resolve this error