Skip to content

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

@codesandbox-ci
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 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cryptic error message for unrelated MODULE_NOT_FOUND error

2 participants