felicio / status.app

https://status-app-nu.vercel.app
1 stars 0 forks source link

Resolve `Error: Cannot find module '/vercel/path0/node_modules/react-native-web/dist/cjs/exports/createElement'` #2

Closed felicio closed 1 year ago

felicio commented 1 year ago
Error: Cannot find module '/vercel/path0/node_modules/react-native-web/dist/cjs/exports/createElement'
Require stack:
- /var/task/.next/server/pages/_document.js
- /var/task/node_modules/next/dist/server/require.js
- /var/task/node_modules/next/dist/server/next-server.js
- /var/task/___next_launcher.cjs
    at Module._resolveFilename (node:internal/modules/cjs/loader:1039:15)
    at mod._resolveFilename (/var/task/node_modules/next/dist/build/webpack/require-hook.js:23:32)
    at Module._load (node:internal/modules/cjs/loader:885:27)
    at Module.require (node:internal/modules/cjs/loader:1105:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at 33330 (/var/task/.next/server/pages/_document.js:1032:18)
    at __webpack_require__ (/var/task/.next/server/webpack-runtime.js:25:43)
    at 83849 (/var/task/.next/server/chunks/318.js:10285:45)
    at __webpack_require__ (/var/task/.next/server/webpack-runtime.js:25:43)
    at 95209 (/var/task/.next/server/pages/_document.js:20:70) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/var/task/.next/server/pages/_document.js',
    '/var/task/node_modules/next/dist/server/require.js',
    '/var/task/node_modules/next/dist/server/next-server.js',
    '/var/task/___next_launcher.cjs'
  ],
  page: '/c'
}
RequestId: 95899430-7666-47cd-bbde-7a5951e11a1f Error: Runtime exited with error: exit status 1
Runtime.ExitError
felicio commented 1 year ago

Resolved with updating next and having react-native-web in transpilePackages at https://github.com/felicio/status-app/blob/c15dba0d47c05d094b8697ee7393cc717cd1eb4b/next.config.js#L47.