Skip to content

Internal server error: Failed to resolve entry for package "terminal-in-react". w/Vite #109

@UI369

Description

@UI369

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:

{
  "name": "hooprunner",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "tsc && vite build",
    "preview": "vite preview"
  },
  "dependencies": {
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "terminal-in-react": "^4.3.1"
  },
  "devDependencies": {
    "@types/react": "^18.0.27",
    "@types/react-dom": "^18.0.10",
    "@vitejs/plugin-react": "^3.1.0",
    "typescript": "^4.9.3",
    "vite": "^4.1.0"
  }
}

vite.config.ts:

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions