Skip to content

CacheControl/esm-config-tostring-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

esm config toString

Behavior

Running an esm based application that has an esm based package w/a config package as a dependency, an error is thrown.

  • problem occurs when importing a package using esm and config, into an application also using esm
  • occurs when both app and package are on 3.0.20
⇒  npm run start

> [email protected] start /Users/chamm/esm-nyc-bug/esm-app
> node -r esm index.js

/Users/chamm/esm-nyc-bug/esm-package/node_modules/config/lib/config.js:1
TypeError: Function.prototype.toString requires that 'this' be a Function
    at Proxy.toString (<anonymous>)
    at Function.keys (<anonymous>)

Usage

# initialize the esm package
cd esm-package;
npm install;
npm link;

# initalize consuming app
cd esm-app
npm install;
npm link esm-package;
npm run start  # throws error: Function.prototype.toString requires that 'this' be a Function

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published