Open UI369 opened 1 year ago
Full errror:
5:44:11 PM [vite] Internal server error: Failed to resolve entry for package "terminal-in-react". The package may have incorrect main/module/exports specified in its package.json.
Plugin: vite:import-analysis
File: /Users/ui369/Workspace/Code/UI369/hooprunner/src/App.js
at packageEntryFailure (file:///Users/ui369/Workspace/Code/UI369/hooprunner/node_modules/vite/dist/node/chunks/dep-3007b26d.js:22004:11)
at resolvePackageEntry (file:///Users/ui369/Workspace/Code/UI369/hooprunner/node_modules/vite/dist/node/chunks/dep-3007b26d.js:22001:5)
at tryNodeResolve (file:///Users/ui369/Workspace/Code/UI369/hooprunner/node_modules/vite/dist/node/chunks/dep-3007b26d.js:21736:20)
at Context.resolveId (file:///Users/ui369/Workspace/Code/UI369/hooprunner/node_modules/vite/dist/node/chunks/dep-3007b26d.js:21487:28)
at async Object.resolveId (file:///Users/ui369/Workspace/Code/UI369/hooprunner/node_modules/vite/dist/node/chunks/dep-3007b26d.js:41587:32)
at async TransformContext.resolve (file:///Users/ui369/Workspace/Code/UI369/hooprunner/node_modules/vite/dist/node/chunks/dep-3007b26d.js:41334:23)
at async normalizeUrl (file:///Users/ui369/Workspace/Code/UI369/hooprunner/node_modules/vite/dist/node/chunks/dep-3007b26d.js:39685:34)
at async TransformContext.transform (file:///Users/ui369/Workspace/Code/UI369/hooprunner/node_modules/vite/dist/node/chunks/dep-3007b26d.js:39826:47)
at async Object.transform (file:///Users/ui369/Workspace/Code/UI369/hooprunner/node_modules/vite/dist/node/chunks/dep-3007b26d.js:41660:30)
at async loadAndTransform (file:///Users/ui369/Workspace/Code/UI369/hooprunner/node_modules/vite/dist/node/chunks/dep-3007b26d.js:39466:29)```
The package does not include the src
folder.
If anyone faced with this issue you can fix it for now importing bundle js
import Terminal from "terminal-in-react/lib/bundle/terminal-react";
Attempting to use the library with a new app. Tried it with CRA, didn't work, switched to Vite, another error.
I want to create an app with basically just this library, what's the happy path to making it work?
Internal server error: Failed to resolve entry for package "terminal-in-react". The package may have incorrect main/module/exports specified in its package.json.
my package.json:
vite.config.ts: