NextJs Cookie Auth with FaunaDB , Fab build Errors
Closed this issue · 2 comments
Rashmi-278 commented
Attempting to deploy https://github.com/vercel/next.js/tree/canary/examples/with-cookie-auth-fauna this example on cloud-flare workers.
npm run build success
npx fab build fails
Build failed.
null
./.fab/.cache/generated-nextjs-renderers.007585b.js
Module not found: Error: Can't resolve 'critters' in '/home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/.fab/.cache'
resolve 'critters' in '/home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/.fab/.cache'
Parsed request is a module
using description file: /home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/package.json (relative path: ./.fab/.cache)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
/home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/.fab/.cache/node_modules doesn't exist or is not a directory
/home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/.fab/node_modules doesn't exist or is not a directory
/home/torch/Desktop/auth tests/node_modules doesn't exist or is not a directory
/home/torch/Desktop/node_modules doesn't exist or is not a directory
/home/torch/node_modules doesn't exist or is not a directory
/home/node_modules doesn't exist or is not a directory
/node_modules doesn't exist or is not a directory
looking for modules in /home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/node_modules
using description file: /home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
using description file: /home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/package.json (relative path: ./node_modules/critters)
no extension
Field 'browser' doesn't contain a valid alias configuration
/home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/node_modules/critters doesn't exist
.wasm
Field 'browser' doesn't contain a valid alias configuration
/home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/node_modules/critters.wasm doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
/home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/node_modules/critters.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/node_modules/critters.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/node_modules/critters.json doesn't exist
as directory
/home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/node_modules/critters doesn't exist
[/home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/.fab/.cache/node_modules]
[/home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/.fab/node_modules]
[/home/torch/Desktop/auth tests/node_modules]
[/home/torch/Desktop/node_modules]
[/home/torch/node_modules]
[/home/node_modules]
[/node_modules]
[/home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/node_modules/critters]
[/home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/node_modules/critters.wasm]
[/home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/node_modules/critters.mjs]
[/home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/node_modules/critters.js]
[/home/torch/Desktop/auth tests/with-cookie-auth-fauna-app/node_modules/critters.json]
@ ./.fab/.cache/generated-nextjs-renderers.007585b.js 18213:21-40
@ ./.fab/.cache/entry-point.js
TypeError: Cannot read property 'message' of undefined
I'm assuming fauna auth is not compatible with fab ??
geelen commented
Yep, seeing a new failure on Next's latest version. If you pull back NextJS version below 10.0.4 it should work
Rashmi-278 commented
Thank you ! That worked !
Here are the steps to resolve this issue,
npm uninstall next
This install the next latest package
npm install next@^9.0
This command installs next@9.5.5
Then
npm run build
npx fab build --minify
npx fab depoy