voting-system icon indicating copy to clipboard operation
voting-system copied to clipboard

Error

Open Celtzpardhan opened this issue 3 years ago • 3 comments

Not working

Celtzpardhan avatar Sep 09 '21 06:09 Celtzpardhan

Fix it

Celtzpardhan avatar Sep 09 '21 15:09 Celtzpardhan

throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath); ^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/runner/voting-system/node_modules/node-fetch/src/index.js require() of ES modules is not supported. require() of /home/runner/voting-system/node_modules/node-fetch/src/index.js from /home/runner/voting-system/index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules. Instead rename /home/runner/voting-system/node_modules/node-fetch/src/index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/runner/voting-system/node_modules/node-fetch/package.json.

jerry-619 avatar Jan 22 '22 15:01 jerry-619

package.json type: module

WilardzySenpai avatar May 25 '22 00:05 WilardzySenpai