Closed gkpo closed 1 year ago
Hello, I'm not familiar with Vercel and that error is rather strange, almost like its injecting its own version of the url
module. URLSearchParams is a global class now though, so importing it is not even necessary (as of Node v10). So I have removed the import and pushed new version v3.0.5 to npm. You can try installing it with npm install node-fetch-cache@latest
and maybe it will work for you.
Omg thanks so much for that reactivity ⚡️ That solved my issue :)
Argh, seems that I got happy too fast.. Now the deploy process works fine, except I have this error during runtime
Unhandled Runtime Error
TypeError: The "original" argument must be of type Function
Call Stack
promisify
node_modules/util/util.js (614:0)
eval
node_modules/@npmcli/move-file/index.js (25:0)
Object../node_modules/@npmcli/move-file/index.js
file:///Users/guillaume/dev/mecanicus/app/.next/static/chunks/pages/_app.js (716:1)
Object.options.factory
/_next/static/chunks/webpack.js (685:31)
__webpack_require__
file:///Users/guillaume/dev/mecanicus/app/.next/static/chunks/webpack.js (37:33)
fn
/_next/static/chunks/webpack.js (354:21)
eval
node_modules/cacache/lib/entry-index.js (16:17)
Object../node_modules/cacache/lib/entry-index.js
file:///Users/guillaume/dev/mecanicus/app/.next/static/chunks/pages/_app.js (1598:1)
Object.options.factory
/_next/static/chunks/webpack.js (685:31)
__webpack_require__
file:///Users/guillaume/dev/mecanicus/app/.next/static/chunks/webpack.js (37:33)
fn
/_next/static/chunks/webpack.js (354:21)
eval
node_modules/cacache/ls.js (3:14)
Object../node_modules/cacache/ls.js
file:///Users/guillaume/dev/mecanicus/app/.next/static/chunks/pages/_app.js (1686:1)
Object.options.factory
/_next/static/chunks/webpack.js (685:31)
__webpack_require__
file:///Users/guillaume/dev/mecanicus/app/.next/static/chunks/webpack.js (37:33)
fn
/_next/static/chunks/webpack.js (354:21)
eval
node_modules/cacache/index.js (3:11)
Object../node_modules/cacache/index.js
file:///Users/guillaume/dev/mecanicus/app/.next/static/chunks/pages/_app.js (1543:1)
Object.options.factory
/_next/static/chunks/webpack.js (685:31)
__webpack_require__
file:///Users/guillaume/dev/mecanicus/app/.next/static/chunks/webpack.js (37:33)
fn
/_next/static/chunks/webpack.js (354:21)
eval
webpack-internal:///./node_modules/node-fetch-cache/src/classes/caching/file_system_cache.js (5:65)
Module../node_modules/node-fetch-cache/src/classes/caching/file_system_cache.js
file:///Users/guillaume/dev/mecanicus/app/.next/static/chunks/pages/_app.js (4513:1)
Module.options.factory
/_next/static/chunks/webpack.js (685:31)
__webpack_require__
file:///Users/guillaume/dev/mecanicus/app/.next/static/chunks/webpack.js (37:33)
fn
/_next/static/chunks/webpack.js (354:21)
eval
webpack-internal:///./node_modules/node-fetch-cache/src/index.js (13:95)
Module../node_modules/node-fetch-cache/src/index.js
file:///Users/guillaume/dev/mecanicus/app/.next/static/chunks/pages/_app.js (4557:1)
Module.options.factory
/_next/static/chunks/webpack.js (685:31)
__webpack_require__
file:///Users/guillaume/dev/mecanicus/app/.next/static/chunks/webpack.js (37:33)
fn
/_next/static/chunks/webpack.js (354:21)
eval
webpack-internal:///./pages/_app.js (10:74)
Module../pages/_app.js
file:///Users/guillaume/dev/mecanicus/app/.next/static/chunks/pages/_app.js (40:1)
Module.options.factory
/_next/static/chunks/webpack.js (685:31)
__webpack_require__
file:///Users/guillaume/dev/mecanicus/app/.next/static/chunks/webpack.js (37:33)
fn
/_next/static/chunks/webpack.js (354:21)
eval
node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js?page=%2F_app&absolutePagePath=private-next-pages%2F_app! (5:15)
eval
node_modules/next/dist/client/route-loader.js (207:48)
That looks to me like it's trying to compile this module into your frontend code. Is that your intention? If so, I'm afraid this module will only work in backend Node.js code, it won't run in a browser.
yes this code is definitely supposed to be run on the server side... I don't get it, I guess that's a question for next.js community. Regardless, thanks a lot for your help :)
Hi, I'm using node-fetch-cache to deploy a site on vercel and I'm having this issue during deploy:
Here's my package.json:
Found this thread: https://github.com/Azure/azure-sdk-for-js/issues/7381 But installing node/types doesn't solve my problem...
Any idea where this can come from ?