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

Fix error messages when importing .keystone/config.js #9359

Merged
merged 5 commits into from
Oct 15, 2024

Conversation

marekryb
Copy link
Contributor

Fixes #9358

I brought back fs.stat that was removed in this commit.

Now error message is meaningful:

(base) exar@exar:~/os/keystone/examples/omit$ pnpm build

> @keystone-6/example-omit@ build /home/exar/os/keystone/examples/omit
> keystone build

🚨 importing built keystone config failed
Error: Cannot find module 'non-existing-module'
Require stack:
- /home/exar/os/keystone/examples/omit/.keystone/config.js
- /home/exar/os/keystone/packages/core/src/scripts/utils.ts
- /home/exar/os/keystone/packages/core/src/scripts/cli.ts

Copy link

codesandbox-ci bot commented Oct 10, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f7ae038:

Sandbox Source
@keystone-6/sandbox Configuration

@dcousens dcousens changed the title Improve error message when importing inaccessible module Fix error messages when importing .keystone/config.js Oct 15, 2024
@dcousens dcousens merged commit 70eaf68 into keystonejs:main Oct 15, 2024
32 of 35 checks passed
@dcousens
Copy link
Member

Thanks @marekryb 💛

@dcousens dcousens added the 🐛 bug Unresolved bug label Oct 15, 2024
@dcousens dcousens mentioned this pull request Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unresolved bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cryptic error message for unrelated MODULE_NOT_FOUND error
2 participants