Missing exports warning from `yarn build`
See original GitHub issueThe following warning is produced from yarn build:
$ yarn build
yarn run v1.22.4
$ rollup --config
src/index.ts → dist/metamask-onboarding.cjs.js, dist/metamask-onboarding.es.js...
created dist/metamask-onboarding.cjs.js, dist/metamask-onboarding.es.js in 1s
src/index.ts → dist/metamask-onboarding.bundle.js...
(!) Missing exports
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
src/index.ts
parse is not exported by node_modules/bowser/src/bowser.js
175:
176: static _detectBrowser () {
177: const browserInfo = Bowser.parse(window.navigator.userAgent);
^
178: if (browserInfo.browser.name === 'Firefox') {
179: return 'FIREFOX';
created dist/metamask-onboarding.bundle.js in 708ms
And we do have a namedExports option defined for cjs:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7 (3 by maintainers)
Top Results From Across the Web
no-unused-export | Yarn - Package Manager
A CLI tool to check whether exported things in a module is used by other modules for Typescript.
Read more >Why doesn't the exports field of npm work in typescript?
Take a look at Yarn workspaces or Bolt. Both of these will symlink your internal dependencies, so when you import them, as far...
Read more >Troubleshooting | React Navigation
I'm getting "Module '[...]' has no exported member 'xxx' when using TypeScript. This might happen if you have an old version of TypeScript...
Read more >ts-node - npm
NPM version NPM downloads Build status Test coverage ... Missing Types; npx, yarn dlx, and node_modules. Performance.
Read more >vite exports is not defined | The AI Search Engine You Control
shell view build $ yarn build --debug yarn run v1.22.17 warning ../package.json: No license field $ vite build --debug vite:config bundled config file ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@nickfla1 just opened a PR with your changes.
We solved changing the import line in index.ts from:
to:
and settings
allowSyntheticDefaultImportstotrueinside tsconfig.json (compilerOptions).Hope someone will find this useful.