"C:\Program Files\nodejs\node.exe" C:\Users\ASUS\WebstormProjects\p2pblockchain\p2p.js
C:\Users\ASUS\WebstormProjects\p2pblockchain\p2p.js:4
getPort = require('get-port');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\ASUS\node_modules\get-port\index.js from C:\Users\ASUS\WebstormProjects\p2pblockchain\p2p.js not supported.
Instead change the require of index.js in C:\Users\ASUS\WebstormProjects\p2pblockchain\p2p.js to a dynamic import() which is available in all CommonJS modules.
at Object. (C:\Users\ASUS\WebstormProjects\p2pblockchain\p2p.js:4:15) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v17.3.0
Process finished with exit code 1
What am i doing wrong
code: 'ERR_REQUIRE_ESM'
}
Node.js v17.3.0
Process finished with exit code 1
What am i doing wrong
Jan 20, 2022, 9:39 AM
It is the answer of this one
Jan 20, 2022, 10:53 AM
I don't quite understand what's the problem running the a code, I'm learning myself and it's from a solidity and Blockchain development book. read what's written and downloaded all dependencies still when i run it says error,
Jan 20, 2022, 11:48 AM