yieldfarming/yieldfarming

node woes on latest update

chppppp opened this issue · 3 comments

> yieldfarming.info@1.0.0 copy-to-dist /home/yieldfarming/yieldfarming
> babel-node build-tools/copy-to-dist.mjs

internal/modules/cjs/loader.js:996
  throw new ERR_REQUIRE_ESM(filename);
  ^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/yieldfarming/yieldfarming/build-tools/copy-to-dist.mjs
    at Module._extensions..mjs (internal/modules/cjs/loader.js:996:9)
    at Object.newLoader [as .mjs] (/home/yieldfarming/yieldfarming/node_modules/pirates/lib/index.js:104:7)
    at Module.load (internal/modules/cjs/loader.js:798:32)
    at Function.Module._load (internal/modules/cjs/loader.js:711:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1014:10)
    at Object.<anonymous> (/home/yieldfarming/yieldfarming/node_modules/@babel/node/lib/_babel-node.js:180:21)
    at Module._compile (internal/modules/cjs/loader.js:945:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:962:10)
    at Module.load (internal/modules/cjs/loader.js:798:32)
    at Function.Module._load (internal/modules/cjs/loader.js:711:12)

ive tried switching node versions around but this fails to build 100% of the time

apparently this is related to a ton of node drama. it will finally build on 12.16.2. What node version are you using?

Thanks

Yeah I moved my dev machine and had to reinstall node which led to build failing so I had to figure out .mjs stuff

I am currently using
node v14.8.0
npm 6.14.7

thanks. on ubuntu 18.04 this will build with

npm 6.14.4
nodejs 12.18.3
node 12.16.2

gotta love node :P