Maiquu / nuxt-quasar

Quasar Module for Nuxt (Unofficial)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] - Build error string.replaceAll is not a function

mognutecnologia opened this issue · comments

Checks

  • I have searched the existing issues for a similar bug and it does not exist!

Environment

Nuxi 3.3.3

Quasar version

v2.11.10

Browsers

Other

Description

I am trying to deploy to Netlify, a Nuxt 3 app, with Quasar.

In my local machine, it build normally. But at Netlify it does not deploys.

Building with yarn generate

3:24:55 PM: [error] string.replaceAll is not a function
3:24:55 PM: at kebabCase (node_modules/nuxt-quasar-ui/dist/module.mjs:36:17)
3:24:55 PM: at categorizeImports (node_modules/nuxt-quasar-ui/dist/module.mjs:571:20)
3:24:55 PM: at async setup (node_modules/nuxt-quasar-ui/dist/module.mjs:420:21)
3:24:55 PM: at async normalizedModule (node_modules/@nuxt/kit/dist/index.mjs:170:17)
3:24:55 PM: at async installModule (node_modules/@nuxt/kit/dist/index.mjs:452:15)
3:24:55 PM: at async initNuxt (node_modules/nuxt/dist/index.mjs:2477:7)

Reproduction steps

Run `yarn generate` on Netlify.

Sorry, I not sure how to get the enviroment from Netlify's build server.

Screenshots

![DESCRIPTION](LINK.png)

Logs

3:24:26 PM: Starting to install dependencies
3:24:26 PM: Python version set to 3.8
3:24:26 PM: Started restoring cached go cache
3:24:26 PM: Finished restoring cached go cache
3:24:26 PM: Installing Go version 1.19.5 (requested 1.19.5)
3:24:32 PM: go version go1.19.5 linux/amd64
3:24:33 PM: Downloading and installing node v14.21.3...
3:24:33 PM: Downloading https://nodejs.org/dist/v14.21.3/node-v14.21.3-linux-x64.tar.xz...
3:24:33 PM: Computing checksum with sha256sum
3:24:33 PM: Checksums matched!
3:24:35 PM: Now using node v14.21.3 (npm v6.14.18)
3:24:35 PM: Enabling Node.js Corepack
3:24:35 PM: Started restoring cached build plugins
3:24:35 PM: Finished restoring cached build plugins
3:24:35 PM: Started restoring cached corepack dependencies
3:24:35 PM: Finished restoring cached corepack dependencies
3:24:35 PM: No npm workspaces detected
3:24:35 PM: Started restoring cached node modules
3:24:35 PM: Finished restoring cached node modules
3:24:35 PM: Installing npm packages using npm version 6.14.18
3:24:38 PM: npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@3. I'll try to do my best with it!
npm WARN deprecated async-cache@1.1.0: No longer maintained. Use [lru-cache](http://npm.im/lru-cache) version 7.6 or higher, and provide an asynchronous `fetchMethod` option.
3:24:45 PM: npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
3:24:54 PM: > esbuild@0.17.15 postinstall /opt/build/repo/node_modules/esbuild
3:24:54 PM: > node install.js
3:24:54 PM: > nuxt-app@ postinstall /opt/build/repo
3:24:54 PM: > nuxt prepare
3:24:54 PM: [log] Nuxi 3.3.3
3:24:55 PM: [error] string.replaceAll is not a function
3:24:55 PM:   at kebabCase (node_modules/nuxt-quasar-ui/dist/module.mjs:36:17)
3:24:55 PM:   at categorizeImports (node_modules/nuxt-quasar-ui/dist/module.mjs:571:20)
3:24:55 PM:   at async setup (node_modules/nuxt-quasar-ui/dist/module.mjs:420:21)
3:24:55 PM:   at async normalizedModule (node_modules/@nuxt/kit/dist/index.mjs:170:17)
3:24:55 PM:   at async installModule (node_modules/@nuxt/kit/dist/index.mjs:452:15)
3:24:55 PM:   at async initNuxt (node_modules/nuxt/dist/index.mjs:2477:7)
3:24:55 PM: Failed during stage 'Install dependencies': dependency_installation script returned non-zero exit code: 1
3:24:55 PM:   at async loadNuxt (node_modules/nuxt/dist/index.mjs:2531:5)
3:24:55 PM:   at async loadNuxt (node_modules/@nuxt/kit/dist/index.mjs:540:19)
3:24:55 PM:   at async Object.invoke (node_modules/nuxt/node_modules/nuxi/dist/chunks/prepare.mjs:37:18)
3:24:55 PM:   at async _main (node_modules/nuxt/node_modules/nuxi/dist/cli.mjs:49:20)
3:24:55 PM: npm ERR! code ELIFECYCLE
3:24:55 PM: npm ERR! errno 1
3:24:55 PM: npm ERR! nuxt-app@ postinstall: `nuxt prepare`
3:24:55 PM: npm ERR! Exit status 1
3:24:55 PM: npm ERR!
3:24:55 PM: npm ERR! Failed at the nuxt-app@ postinstall script.
3:24:55 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
3:24:55 PM: npm ERR! A complete log of this run can be found in:
3:24:55 PM: npm ERR!     /opt/buildhome/.npm/_logs/2023-04-06T18_24_55_337Z-debug.log
3:24:55 PM: Error during npm install
3:24:55 PM: Build was terminated: dependency_installation script returned non-zero exit code: 1
3:24:55 PM: Failing build: Failed to install dependencies
3:24:55 PM: Finished processing build request in 32.379s

You should upgrade your Netlify environment to Node v16.0.0 or above if possible. Since minimum requirement for nuxt 3 is node v16.0.0, I don't plan on making it compatible with earlier versions.

Cause of error is that string.replaceAll method is only available node 15 and above.