geut / chan

A Changelog CLI based on http://keepachangelog.com/
ISC License
87 stars 10 forks source link

[node v12]: Cannot find package 'fs' imported #60

Closed tinchoz49 closed 3 years ago

tinchoz49 commented 3 years ago

Executing chan added '...' in node v12 I get the error:

internal/process/esm_loader.js:74
    internalBinding('errors').triggerUncaughtException(
                              ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'fs' imported from /home/tincho/projects/geut/nanocontext/node_modules/@geut/chan/src/commands/init.js
    at packageResolve (internal/modules/esm/resolve.js:650:9)
    at moduleResolve (internal/modules/esm/resolve.js:691:18)
    at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:784:11)
    at Loader.resolve (internal/modules/esm/loader.js:100:40)
    at Loader.getModuleJob (internal/modules/esm/loader.js:246:28)
    at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:47:40)
    at link (internal/modules/esm/module_job.js:46:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

The error is related to being imported fs by 'fs/promises' since node v12 doesn't have that feature.

elmasse commented 3 years ago

Fixed in v3.1.0