When running next-payload build with payload@2.1.1 and @payloadcms/next-payload@0.1.9 I get the following error:
TypeError: loadConfig is not a function
at module.exports ([project]\node_modules\@payloadcms\next-payload\build.js:21:24)
at Object.<anonymous> ([project]\node_modules\@payloadcms\next-payload\bin.js:15:23)
at Module._compile (node:internal/modules/cjs/loader:1255:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1309:10)
at Module.load (node:internal/modules/cjs/loader:1113:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47
Hey @otomir23 you should not need to run next-payload build from anywhere. I just removed it from the bin folder to remove any confusion going forward. Thanks for pointing it out!
When running
next-payload build
withpayload@2.1.1
and@payloadcms/next-payload@0.1.9
I get the following error: