Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Fix next-adapter external bug #2412

Merged
merged 1 commit into from
Jul 29, 2020

Conversation

EvanBacon
Copy link
Contributor

Next.js was throwing the following node.js error:

TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received undefined
    at validateString (internal/validators.js:120:11)
    at Module.require (internal/modules/cjs/loader.js:1019:3)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.react-native-web/dist/exports/AppRegistry (/Users/evanbacon/Documents/GitHub/lab/my-next-expo-app/.next/server/static/development/pages/_document.js:813:18)
    at __webpack_require__ (/Users/evanbacon/Documents/GitHub/lab/my-next-expo-app/.next/server/static/development/pages/_document.js:23:31)
    at Module../pages/_document.js (/Users/evanbacon/Documents/GitHub/lab/my-next-expo-app/.next/server/static/development/pages/_document.js:766:99)
    at __webpack_require__ (/Users/evanbacon/Documents/GitHub/lab/my-next-expo-app/.next/server/static/development/pages/_document.js:23:31)
    at Object.0 (/Users/evanbacon/Documents/GitHub/lab/my-next-expo-app/.next/server/static/development/pages/_document.js:779:18)
    at __webpack_require__ (/Users/evanbacon/Documents/GitHub/lab/my-next-expo-app/.next/server/static/development/pages/_document.js:23:31)
    at /Users/evanbacon/Documents/GitHub/lab/my-next-expo-app/.next/server/static/development/pages/_document.js:91:18
    at Object.<anonymous> (/Users/evanbacon/Documents/GitHub/lab/my-next-expo-app/.next/server/static/development/pages/_document.js:94:10)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.loadComponents (/Users/evanbacon/Documents/GitHub/lab/my-next-expo-app/node_modules/next/dist/next-server/server/load-components.js:24:25)
    at DevServer.findPageComponents (/Users/evanbacon/Documents/GitHub/lab/my-next-expo-app/node_modules/next/dist/next-server/server/next-server.js:556:60)
    at DevServer.renderErrorToHTML (/Users/evanbacon/Documents/GitHub/lab/my-next-expo-app/node_modules/next/dist/next-server/server/next-server.js:853:33)
    at DevServer.renderErrorToHTML (/Users/evanbacon/Documents/GitHub/lab/my-next-expo-app/node_modules/next/dist/server/next-dev-server.js:19:1184) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Because Webpack had generated a module like require(undefined)

@EvanBacon EvanBacon added bug Something isn't working Platform: web Using Expo in the browser labels Jul 29, 2020
@EvanBacon EvanBacon requested a review from brentvatne July 29, 2020 04:34
@EvanBacon EvanBacon self-assigned this Jul 29, 2020
@EvanBacon EvanBacon merged commit 887228b into master Jul 29, 2020
@EvanBacon EvanBacon deleted the @evanbacon/webpack-config/fix-next-error branch July 29, 2020 08:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Platform: web Using Expo in the browser
Projects
None yet
2 participants