wessberg / rollup-plugin-ts

A TypeScript Rollup plugin that bundles declarations, respects Browserslists, and enables seamless integration with transpilers such as babel and swc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: "[name] is not exported by [module]"

rexkenley opened this issue · comments

I am using a package called react-social-icons that is causing an error when I try to build my library.

How do I fix it? (I did some research and it suggests using the commonjs plugin namedExports, but I am not sure if that is compatible with your plugin.)

Thanks!

[!] Error: 'SocialIcon' is not exported by node_modules/react-social-icons/build/react-social-icons.js, imported by src/components/SocialPane/SocialPane.tsx https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module src/components/SocialPane/SocialPane.tsx (3:9) 1: // Automatically generated component file for SocialPane 2: import { Stack } from "@fluentui/react/lib/Stack"; 3: import { SocialIcon } from "react-social-icons"; ^ 4: import { ISocialIcon } from "powerframework360/lib/ts/interfaces/socialIcon"; Error: 'SocialIcon' is not exported by node_modules/react-social-icons/build/react-social-icons.js, imported by src/components/SocialPane/SocialPane.tsx at error (C:\Temp8\PowerFramework360\node_modules\rollup\dist\shared\rollup.js:198:30) at Module.error (C:\Temp8\PowerFramework360\node_modules\rollup\dist\shared\rollup.js:12542:16) at Module.traceVariable (C:\Temp8\PowerFramework360\node_modules\rollup\dist\shared\rollup.js:12901:29) at ModuleScope.findVariable (C:\Temp8\PowerFramework360\node_modules\rollup\dist\shared\rollup.js:11553:39) at FunctionScope.findVariable (C:\Temp8\PowerFramework360\node_modules\rollup\dist\shared\rollup.js:6486:38) at ChildScope.findVariable (C:\Temp8\PowerFramework360\node_modules\rollup\dist\shared\rollup.js:6486:38) at FunctionScope.findVariable (C:\Temp8\PowerFramework360\node_modules\rollup\dist\shared\rollup.js:6486:38) at ChildScope.findVariable (C:\Temp8\PowerFramework360\node_modules\rollup\dist\shared\rollup.js:6486:38) at Identifier.bind (C:\Temp8\PowerFramework360\node_modules\rollup\dist\shared\rollup.js:7553:40) at CallExpression.bind (C:\Temp8\PowerFramework360\node_modules\rollup\dist\shared\rollup.js:5379:73)