1.nodejs: Error
・nodeのversionを上げるとapplicationの実行時にerrorがでる
(node:2551164) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time (Use `node --trace-warnings ...` to show where the warning was created) node:internal/deps/undici/undici:6266 fetchParams.controller.controller.error(new TypeError("terminated", { ^ TypeError: terminated at Fetch.onAborted (node:internal/deps/undici/undici:6266:53) at Fetch.emit (node:events:527:28) at Fetch.terminate (node:internal/deps/undici/undici:5522:14) at Object.onError (node:internal/deps/undici/undici:6357:36) at Request.onError (node:internal/deps/undici/undici:2023:31) at errorRequest (node:internal/deps/undici/undici:3949:17) at Socket.onSocketClose (node:internal/deps/undici/undici:3411:9) at Socket.emit (node:events:527:28) at TCP.(node:net:715:12) { [cause]: TrailerMismatchError: Trailers does not match trailer header at Parser.onMessageComplete (node:internal/deps/undici/undici:3317:34) at wasm_on_message_complete (node:internal/deps/undici/undici:2953:34) at wasm://wasm/0002afd2:wasm-function[45]:0x8dc at wasm://wasm/0002afd2:wasm-function[56]:0x1ad3 at wasm://wasm/0002afd2:wasm-function[55]:0xcd7 at wasm://wasm/0002afd2:wasm-function[21]:0x4e4 at Parser.execute (node:internal/deps/undici/undici:3055:26) at Parser.readMore (node:internal/deps/undici/undici:3034:16) at Socket.onSocketReadable (node:internal/deps/undici/undici:3364:14) at Socket.emit (node:events:527:28) at emitReadable_ (node:internal/streams/readable:590:12) at process.processTicksAndRejections (node:internal/process/task_queues:81:21) { code: 'UND_ERR_TRAILER_MISMATCH' } }
2.現在のnodeのversionの確認と対策
# node -v v18.1.0
・対策は、nodeのversionを17にdowngrade
3.nodeのversion 17がinstall済みかどうかを確認
# nvm use 17 N/A: version "17 -> N/A" is not yet installed. You need to run "nvm install 17" to install it before using it.
4.nvmでnodeのversion 17 をinstall
# nvm install 17 Downloading and installing node v17.9.0... Downloading https://nodejs.org/dist/v17.9.0/node-v17.9.0-linux-x64.tar.xz... ######################################################################### 100.0% Computing checksum with sha256sum Checksums matched! Now using node v17.9.0 (npm v8.5.5) Creating default alias: default -> 17 (-> v17.9.0) #
5.nvmでnodeのversion 17 を使用
・一度設定すると、次にterminalを立ち上げ直しても、useの状態は保存される
# nvm use 17 Now using node v17.9.0 (npm v8.5.5) # node -v v17.9.0 #
6.結果
・applicationの実行時のerrorは出なくなった