Open engmsilva opened 1 year ago
At the suggestion of a Discord group member, I added the line of code below to the ~/app-payload/src/payload.config.ts
. This allowed executing the project construction command without error.
admin: {
user: Users.slug,
webpack: (a) => a, // line of code added
},
But when running the npm run dev
command, it opens a blank screen with the below error in the browser console.
Uncaught TypeError: __webpack_require__(...).config is not a function
at ./src/payload.config.ts (payload.config.ts:7:25)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:62:1)
at fn (hot module replacement:62:1)
at ./node_modules/payload/dist/admin/Root.js (Root.js:8:42)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:62:1)
at fn (hot module replacement:62:1)
at ./node_modules/payload/dist/admin/index.js (index.js:10:32)
at __webpack_require__ (bootstrap:24:1)
Is there anything else I can do?
Hmm, that could be because I'm adding some dependencies to resolve.alias:
axios: false,
'passport-oauth2': false,
'express-session': false,
passport: false,
Do you use axios in the frontend? I removed the alias in v0.3.0 so it shouldn't be a problem anymore.
v0.3.0 has been refactored to not need a special password field. It may result in a slightly different user token tough.
hello im using node 18.12.1 "payload": "^1.8.3", "payload-plugin-oauth": "^0.3.1", i added the webpack: (a) => a, // line of code added
and when i try to build the app, it just stays building the app forever
I'm unable to reproduce, can you post a minimal example repository?
I'm using node v16.17.0, Payload v1.6.26 and payload-plugin-oauth v0.2.0.
This is the configuration from the ~/app-payload/src/payload.config.ts file:
After running the
npm run build
command, it returns the error:Any idea what could be going on?