Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Error [ERR_REQUIRE_ESM]: require() of ES Module

This error is caused when you install the latest version of nanoID

To fix the problem follow these steps:

Uninstall nanoid:
npm uninstall nanoid

Install Version 3 supporting all 3.x.x:
npm install nanoid@^3.0.0
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Error #ES #Module
ADD COMMENT
Topic
Name
9+4 =