You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import pTimeout, { TimeoutError } from 'p-timeout';
^^^^^^^^^^^^
SyntaxError: The requested module 'p-timeout' is expected to be of type CommonJS, which does not support named exports. CommonJS modules can be imported by importing the default export.
For example:
import pkg from 'p-timeout';
const { TimeoutError } = pkg;
I'm using it in a router file, NodeJS
The text was updated successfully, but these errors were encountered:
AugustoZanoni
changed the title
Why Am I Getting This Error? v7.0.0
'p-timeout' is expected to be of type CommonJS - Why Am I Getting This Error? v7.0.0
Apr 6, 2021
I'm using it in a router file, NodeJS
The text was updated successfully, but these errors were encountered: