0

我正在使用 Routify 框架构建一个网站。当yarn run serve, 之后yarn run build, 我得到一个错误。

node:buffer:202
    throw new ERR_INVALID_ARG_TYPE('target', ['Buffer', 'Uint8Array'], target);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "target" argument must be an instance of Buffer or Uint8Array. Received null
    at new NodeError (node:internal/errors:329:5)
    at _copy (node:buffer:202:11)
    at Buffer.copy (node:buffer:776:12)
    at Request.<anonymous> (/Users/seongto/devs/front-end/f14-allius-public-routify/node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js:864:11)
    at Request.emit (node:events:378:20)
    at Gunzip.<anonymous> (/Users/seongto/devs/front-end/f14-allius-public-routify/node_modules/request/request.js:1073:12)
    at Gunzip.emit (node:events:378:20)
    at addChunk (node:internal/streams/readable:313:12)
    at readableAddChunk (node:internal/streams/readable:288:9)
    at Gunzip.Readable.push (node:internal/streams/readable:227:10) {
  code: 'ERR_INVALID_ARG_TYPE'
}

那是什么?有什么解决办法吗?

运行时不会出现问题yarn run dev

下面是我的脚本package.json

"scripts": {
    "dev": "run-p routify nollup",
    "dev:ssr": "run-p routify rollup",
    "build": "run-s build:*",
    "build:app": "routify -b && rollup -c",
    "build:static": "spank",
    "serve": "spassr --ssr",
    "rollup": "rollup -cw",
    "nollup": "nollup -c",
    "routify": "routify"

ps 我想做的是SSR。

4

0 回答 0