js-libp2p
js-libp2p copied to clipboard
SyntaxError: Named export 'isReactNative' not found.
Using the latest nightly I get this error at runtime
file:///home/cayman/Code/lodestar/node_modules/libp2p/dist/src/config.js:10
import { isNode, isBrowser, isWebWorker, isElectronMain, isElectronRenderer, isReactNative } from 'wherearewe';
^^^^^^^^^^^^^
SyntaxError: Named export 'isReactNative' not found. The requested module 'wherearewe' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'wherearewe';
const { isNode, isBrowser, isWebWorker, isElectronMain, isElectronRenderer, isReactNative } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:128:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:194:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:385:24)
at async file:///home/cayman/Code/lodestar/packages/cli/bin/lodestar.js:3:1
This wherearewe dependency was added in https://github.com/libp2p/js-libp2p/pull/1296