-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
It looks like a monkey-patch for node internals for webpack to decide between 4 and 5 around this code: https://www.runpkg.com/?next@10.1.3/dist/next-server/server/config.js#397 (after prettifying)
await (0, _configUtils.loadWebpackHook)(phase, dir);
produces this error because of missing files, where awkwardly it looks like we have to include webpack even though we don't want to use it at runtime:
"Error: Cannot find module 'next/dist/compiled/webpack/webpack-lib'",
"Require stack:",
"- /var/task/node_modules/next/dist/build/webpack/require-hook.js",
"- /var/task/node_modules/next/dist/next-server/server/config-utils.js",
"- /var/task/node_modules/next/dist/next-server/server/config.js",
"- /var/task/node_modules/next/dist/next-server/server/next-server.js",
"- /var/task/node_modules/next/dist/server/next.js",
"- /var/task/server/index.js",
"- /var/runtime/UserFunction.js",
"- /var/runtime/index.js",
" at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)",
" at Function.resolve (internal/modules/cjs/helpers.js:80:19)",
" at /var/task/node_modules/next/dist/build/webpack/require-hook.js:4:1520",
" at Array.map (<anonymous>)",
" at Object.<anonymous> (/var/task/node_modules/next/dist/build/webpack/require-hook.js:4:1474)",
" at Module._compile (internal/modules/cjs/loader.js:999:30)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)",
" at Module.load (internal/modules/cjs/loader.js:863:32)",
" at Function.Module._load (internal/modules/cjs/loader.js:708:14)",
" at Module.require (internal/modules/cjs/loader.js:887:19)"
We could just trace and package those files, but it would be nice to not bloat the package.
We've bandaided this with a tracing configuration like this: afc7d2e#diff-8cf16232f3b7094ea431234555d38ad71e6e62764c3e29a5841e25172aea5049R127-R130
Task:
- Figure out if we can avoid this...
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working