ReferenceError: Request is not defined
Ivesfsy opened this issue · 1 comments
[root@ser451744158995 web]# pnpm install
Lockfile is up to date, resolution step is skipped
Packages: +473
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
node_modules/.pnpm/protobufjs@7.2.4/node_modules/protobufjs: Running postinstall script, done in 204ms
node_modules/.pnpm/bufferutil@4.0.8/node_modules/bufferutil: Running install script, done in 367ms
node_modules/.pnpm/utf-8-validate@6.0.3/node_modules/utf-8-validate: Running install script, done in 408ms
Done in 10.2s
[root@ser451744158995 web]# make dev
pnpm dev --hostname 0.0.0.0 --port 8067
nextjs@0.1.0 dev /www/wwwroot/lanshankj.com/web
next dev "--hostname" "0.0.0.0" "--port" "8067"
/www/wwwroot/lanshankj.com/web/node_modules/.pnpm/next@14.0.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/web/spec-extension/request.js:28
class NextRequest extends Request {
^
ReferenceError: Request is not defined
at Object. (/www/wwwroot/lanshankj.com/web/node_modules/.pnpm/next@14.0.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/web/spec-extension/request.js:28:27)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at Module.mod.require (/www/wwwroot/lanshankj.com/web/node_modules/.pnpm/next@14.0.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/require-hook.js:64:28)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (/www/wwwroot/lanshankj.com/web/node_modules/.pnpm/next@14.0.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/web/spec-extension/adapters/next-request.js:37:18)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
upgrade your nodejs version
"node": ">=18.17.0"