To solve…
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".json" for /home/ntala/Documents/js es6/node_modules/an-array-of-english-words/index.json
at Loader.defaultGetFormat [as _getFormat] (internal/modules/esm/get_format.js:65:15)
at Loader.getFormat (internal/modules/esm/loader.js:113:42)
at Loader.getModuleJob (internal/modules/esm/loader.js:243:31)
at async ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:52:21)
at async Promise.all (index 0)
at async link (internal/modules/esm/module_job.js:57:9) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}
just add –experimental-json-modules to the execution. In this case:
"scripts": {
"build": "node ntala.js",
//--
"start": "node --experimental-json-modules ntala.js"
},