Під час розробки веб-проєктів на базі Nuxt.js можуть виникати різні проблеми, пов’язані з підключенням модулів та пакетів. Однією з таких проблем є повідомлення про помилку “The requested module ‘node:stream’ does not provide an export named ‘getDefaultHighWaterMark'”. Ця помилка може виникнути після перевстановлення пакетів за допомогою npm або під час спроби запустити проєкт після оновлення Node.js. У цій статті ми розглянемо, як вирішити цю проблему та продовжити роботу над проєктом без перешкод.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
npm start npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE required: { node: '^16 || ^18 || >= 20' }, npm WARN EBADENGINE current: { node: 'v19.0.0', npm: '8.19.2' } npm WARN EBADENGINE } > postinstall > nuxt prepare Nuxi 3.0.0 ERROR The requested module 'node:stream' does not provide an export named 'getDefaultHighWaterMark' import {PassThrough as PassThroughStream, getDefaultHighWaterMark} from 'node:stream'; ^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: The requested module 'node:stream' does not provide an export named 'getDefaultHighWaterMark' at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21) at async ModuleJob.run (node:internal/modules/esm/module_job:189:5) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:518:24) at async importModuleDynamicallyWrapper (node:internal/vm/module:438:15) at async installModule (/home/project/node_modules/@nuxt/kit/dist/index.mjs:416:3) at async initNuxt (/home/project/node_modules/nuxt/dist/index.mjs:1825:7) at async loadNuxt (/home/project/node_modules/nuxt/dist/index.mjs:1857:5) at async loadNuxt (/home/project/node_modules/@nuxt/kit/dist/index.mjs:493:19) at async Object.invoke (/home/project/node_modules/nuxi/dist/chunks/prepare.mjs:30:18) at async _main (/home/project/node_modules/nuxi/dist/cli.mjs:50:20) npm ERR! code 1 npm ERR! path /home/project npm ERR! command failed npm ERR! command sh -c -- nuxt prepare |