nuxt-ui-pro / saas

A SaaS template made with Nuxt UI Pro.

Home Page:https://saas-template.nuxt.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

install deps error getDefaultHighWaterMark

PhE opened this issue · comments

The setup of the template raises the error :

 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:124:21)
  at async ModuleJob.run (node:internal/modules/esm/module_job:190:5) 

 ERROR  The requested module 'node:stream' does not provide an export named 'getDefaultHighWaterMark' 

 1418 packages installed [22.37s]

 ERROR  Error: Command failed with exit code 1: bun install       

It occurs while bootstraping a new project with:

npx nuxi init -t github:nuxt-ui-pro/saas

and choosing bun as the package manager.

It also occurs with a fresh git clone :

git clone git@github.com:nuxt-ui-pro/saas.git
cd saas
npx bun install

Same error with npm and yarn package managers.

With pnpm, it succeeds ... but with a trick:

❯ npx nuxi init -t github:nuxt-ui-pro/saas saastest8

✔ Which package manager would you like to use?
pnpm
◐ Installing dependencies...

 ERROR  Error: Command failed with ENOENT: corepack pnpm install
spawn corepack ENOENT

The npx nuxi ... fails but manually install the deps works:

> cd saas
> npx pnpm install
Lockfile is up to date, resolution step is skipped
Packages: +1192
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 1192, reused 1191, downloaded 0, added 1192, done

dependencies:
+ @iconify-json/heroicons 1.1.19
+ @iconify-json/simple-icons 1.1.90
+ @nuxt/content 2.12.0
+ @nuxt/image 1.3.0
+ @nuxt/ui-pro 0.7.5
+ @nuxtjs/fontaine 0.4.1
+ @nuxtjs/google-fonts 3.1.3
+ @vueuse/nuxt 10.7.2
+ nuxt 3.10.1
+ nuxt-og-image 2.2.4

devDependencies:
+ @nuxt/eslint-config 0.2.0
+ @nuxthq/studio 1.0.10
+ eslint 8.56.0
+ vue-tsc 1.8.27

> nuxt-ui-pro-template-saas@ postinstall /home/philippe/src/saastest8
> nuxt prepare

ℹ Using default Tailwind CSS file                                                                                                           nuxt:tailwindcss 2:12:39 PM
◐ Downloading fonts...                                                                                                                      nuxt:google-fonts 2:12:39 PM
✔ https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&display=swap                                                   nuxt:google-fonts 2:12:40 PM
ℹ DM_Sans-300                                                                                                                              nuxt:google-fonts 2:12:40 PM
✔ Download fonts completed.                                                                                                                nuxt:google-fonts 2:12:40 PM
                                                                                                                                            nuxt:google-fonts 2:12:40 PM
✔ Types generated in .nuxt                                                                                                                                   2:12:41 PM

Done in 6.7s

Please note that I only have npx globally installed. I don't have yarn/npm/pnpm globally installed. I always use the later withnpx.

Have you checked if there is an issue about this here https://github.com/nuxt/cli?

Have to tried upgrading the node version on the project to the latest one? I was facing same problem when using node 18.15 version. After upgrading it to the latest fixes the issue.

***Edit: Add this too if problem persists "npm install --legacy-peer-deps"

A node version upgrade just fixed it for me 👍

I also changed the version of node.js and it worked correctly.
I ran nvm use 18.17.0

I had this issue out of the sudden when building Nuxt static page on Github Action. Update of node to 18.17.0 worked as well. Thanks!

Node.js 16 has reached official end of life on September 11 2023, it is highly recommended to update to the latest LTS release (Node.js 18): https://nuxt.com/docs/getting-started/installation#new-project