payloadcms / next-payload

A utility to deploy Payload serverlessly within a Next.js app
308 stars 42 forks source link

`loadConfig is not a function` when running `next-payload build` #98

Closed otomir23 closed 11 months ago

otomir23 commented 11 months ago

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
JarrodMFlesch commented 11 months ago

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!

otomir23 commented 11 months ago

Got it, thanks!