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

The clean scripts seem to miss some cache dirs #328

Open
mme opened this issue May 8, 2024 · 1 comment
Open

The clean scripts seem to miss some cache dirs #328

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

Comments

@mme
Copy link
Collaborator

mme commented May 8, 2024

Describe the bug
Setting sourcemap=true in the react-core package results in a build error.

To Reproduce
Steps to reproduce the behavior:

  1. Set sourcemap=true in the tsup config of react-core
  2. Run pnpm -w fresh build

Expected behavior
Builds without error

Error Message

next-openai:build: cache miss, executing 9ba582d7b51e5742
next-openai:build: 
next-openai:build: > next-openai@1.21.0 build /Users/mme/Code/CopilotKit/CopilotKit/examples/next-openai
next-openai:build: > next build
next-openai:build: 
next-openai:build: - info Loaded env from /Users/mme/Code/CopilotKit/CopilotKit/examples/next-openai/.env.local
next-openai:build: - info Creating an optimized production build...
next-openai:build: Failed to compile.
next-openai:build: 
next-openai:build: ../../packages/react-core/dist/index.mjs
next-openai:build: Error: 
next-openai:build:   x Expression expected
next-openai:build:     ,-[/Users/mme/Code/CopilotKit/CopilotKit/packages/react-core/dist/index.mjs:72:1]
next-openai:build:  72 | };
next-openai:build:  73 | //# sourceMappingURL=index.mjs.map Promise.resolve(x.value).then(fulfilled, rejected);
next-openai:build:  74 |     step((generator = generator.apply(__this, __arguments)).next());
next-openai:build:  75 |   });
next-openai:build:     :   ^
next-openai:build:  76 | };
next-openai:build:  77 | 
next-openai:build:  78 | // src/components/copilot-provider/copilotkit.tsx
next-openai:build:     `----
next-openai:build: 
next-openai:build: Caused by:
next-openai:build:     Syntax Error
next-openai:build: 
next-openai:build: Import trace for requested module:
next-openai:build: ../../packages/react-core/dist/index.mjs
next-openai:build: ./src/app/page.tsx
next-openai:build: 
next-openai:build: ../../packages/react-core/dist/index.mjs
next-openai:build: Module parse failed: Unexpected token (75:2)
next-openai:build: You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
next-openai:build: | //# sourceMappingURL=index.mjs.map Promise.resolve(x.value).then(fulfilled, rejected);
next-openai:build: |     step((generator = generator.apply(__this, __arguments)).next());
next-openai:build: >   });
next-openai:build: | };
next-openai:build: | 
next-openai:build: 
next-openai:build: Import trace for requested module:
next-openai:build: ../../packages/react-core/dist/index.mjs
next-openai:build: ./src/app/devday/page.tsx
next-openai:build: 
next-openai:build: 
next-openai:build: > Build failed because of webpack errors
next-openai:build:  ELIFECYCLE  Command failed with exit code 1.
next-openai:build: ERROR: command finished with error: command (/Users/mme/Code/CopilotKit/CopilotKit/examples/next-openai) pnpm run build exited (1)
next-openai#build: command (/Users/mme/Code/CopilotKit/CopilotKit/examples/next-openai) pnpm run build exited (1)
@mme mme added the bug Something isn't working label May 8, 2024
@mme
Copy link
Collaborator Author

mme commented May 16, 2024

This is not actually related to sourcemap=true...

It seems like we miss some cache directories when cleaning up the build. Will change the title

@mme mme changed the title Setting sourcemap=true in react-core causes build error The clean scripts seem to miss some cache dirs May 16, 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