Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remix build error (backend package) #327

Open
mme opened this issue May 8, 2024 · 0 comments
Open

Remix build error (backend package) #327

mme opened this issue May 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mme
Copy link
Collaborator

mme commented May 8, 2024

Describe the bug
There is a build error with the backend package when performing a remix production build.

✓ 1136 modules transformed.
x Build failed in 669ms
Error [RollupError]: app/routes/copilotkit.tsx (1:9): "CopilotRuntime" is not exported by "../../../Users/mme/Code/CopilotKit/CopilotKit/packages/backend/dist/index.js", imported by "app/routes/copilotkit.tsx".
file: /private/tmp/test-remix-app/app/routes/copilotkit.tsx:1:9
1: import { CopilotRuntime, OpenAIAdapter } from "@copilotkit/backend";
            ^
2: import type { ActionFunctionArgs } from "@remix-run/node";
    at getRollupError (file:///private/tmp/test-remix-app/node_modules/rollup/dist/es/shared/parseAst.js:394:41)
    at error (file:///private/tmp/test-remix-app/node_modules/rollup/dist/es/shared/parseAst.js:390:42)
    at Module.error (file:///private/tmp/test-remix-app/node_modules/rollup/dist/es/shared/node-entry.js:13855:16)
    at Module.traceVariable (file:///private/tmp/test-remix-app/node_modules/rollup/dist/es/shared/node-entry.js:14303:29)
    at ModuleScope.findVariable (file:///private/tmp/test-remix-app/node_modules/rollup/dist/es/shared/node-entry.js:11984:39)
    at FunctionScope.findVariable (file:///private/tmp/test-remix-app/node_modules/rollup/dist/es/shared/node-entry.js:7432:38)
    at FunctionBodyScope.findVariable (file:///private/tmp/test-remix-app/node_modules/rollup/dist/es/shared/node-entry.js:7432:38)
    at Identifier.bind (file:///private/tmp/test-remix-app/node_modules/rollup/dist/es/shared/node-entry.js:6908:40)
    at NewExpression.bind (file:///private/tmp/test-remix-app/node_modules/rollup/dist/es/shared/node-entry.js:4775:23)
    at VariableDeclarator.bind (file:///private/tmp/test-remix-app/node_modules/rollup/dist/es/shared/node-entry.js:4775:23) {
  binding: 'CopilotRuntime',
  code: 'MISSING_EXPORT',
  exporter: '/Users/mme/Code/CopilotKit/CopilotKit/packages/backend/dist/index.js',
  id: '/private/tmp/test-remix-app/app/routes/copilotkit.tsx',
  url: 'https://rollupjs.org/troubleshooting/#error-name-is-not-exported-by-module',
  pos: 9,
  loc: {
    column: 9,
    file: '/private/tmp/test-remix-app/app/routes/copilotkit.tsx',
    line: 1
  },
  frame: '1: import { CopilotRuntime, OpenAIAdapter } from "@copilotkit/backend";\n' +
    '            ^\n' +
    '2: import type { ActionFunctionArgs } from "@remix-run/node";',

To Reproduce
Steps to reproduce the behavior:

  1. Create a minimal remix project with an action route that uses CopilotRuntime to serve the request
  2. npm run build

Expected behavior
Builds without error

@mme mme added the bug Something isn't working label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant