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

Payload ^1.14 + @swc/core v1.3.79 break payload build #3227

Closed
thgh opened this issue Aug 25, 2023 · 4 comments
Closed

Payload ^1.14 + @swc/core v1.3.79 break payload build #3227

thgh opened this issue Aug 25, 2023 · 4 comments
Labels
status: needs-triage Possible bug which hasn't been reproduced yet

Comments

@thgh
Copy link
Contributor

thgh commented Aug 25, 2023

Link to reproduction

todo

To Reproduce

  1. Run payload build

Describe the Bug

(payload v1.13 not affected)

Error message:

$ PAYLOAD_CONFIG_PATH=src/payload.config.ts payload build
node:internal/modules/cjs/loader:1077
  const err = new Error(message);
              ^

Error: Cannot find module 'node_modules/payload/config'
Require stack:
- /app/payload.config.ts
- /app/payload/dist/config/load.js
- /app/payload/dist/bin/generateTypes.js
- /app/payload/dist/bin/index.js
- /app/payload/bin.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/app/src/payload.config.ts:11:13)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._compile (/app/node_modules/pirates/lib/index.js:117:24)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Object.newLoader [as .ts] (/app/node_modules/pirates/lib/index.js:121:7)
    at Module.load (node:internal/modules/cjs/loader:1119:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/app/src/payload.config.ts',
    '/app/node_modules/payload/dist/config/load.js',
    '/app/node_modules/payload/dist/bin/generateTypes.js',
    '/app/node_modules/payload/dist/bin/index.js',
    '/app/node_modules/payload/bin.js'
  ]
}

Node.js v18.17.0

Payload Version

1.14 - 1.15

@thgh thgh added the status: needs-triage Possible bug which hasn't been reproduced yet label Aug 25, 2023
@gusfune
Copy link

gusfune commented Aug 25, 2023

I can confirm I had the exact same issue. Reverting to Payload 1.13.4 fixes the issue temporarily.
All versions afterwards have the same issue on MODULE_NOT_FOUND, tested with both yarn 1.x, npm and yarn 3.x.

@DanRibbens
Copy link
Contributor

DanRibbens commented Aug 25, 2023

Looks like @swc/core is moving quickly on this swc-project/swc#7866

If they don't have a release out soon I'll pin the version on our end and release.

Thanks for reporting @thgh and sharing on the swc issue!

@kdy1
Copy link

kdy1 commented Aug 25, 2023

@DanRibbens
Copy link
Contributor

I pinned to the last known working version of swc. We are going to be more intentional about updating deps going forward for stability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs-triage Possible bug which hasn't been reproduced yet
Projects
None yet
Development

No branches or pull requests

4 participants