nuxt-modules / algolia

🔎 Algolia module for Nuxt
https://algolia.nuxtjs.org/
MIT License
189 stars 35 forks source link

'toASCII' is not exported by __vite-browser-external #129

Closed quentint closed 1 year ago

quentint commented 1 year ago

Version

@nuxtjs/algolia: 1.4.2 nuxt: 3.0.0

Steps to reproduce

What is Expected?

Build should succeed.

What is actually happening?

Getting the following error:

Nuxi 3.0.0                                                                                                    12:10:03
Nuxt 3.0.0 with Nitro 1.0.0                                                                                   12:10:03

 ERROR  'toASCII' is not exported by __vite-browser-external, imported by node_modules/rollup-plugin-node-polyfills/polyfills/url.js
file: /home/quentint/dev/edumedia-site/nuxt/node_modules/rollup-plugin-node-polyfills/polyfills/url.js:23:8
21:
22:
23: import {toASCII} from 'punycode';
            ^
24: import {isObject,isString,isNullOrUndefined,isNull} from 'util';
25: import {parse as qsParse,stringify as qsStringify} from 'querystring';

 ERROR  'toASCII' is not exported by __vite-browser-external, imported by node_modules/rollup-plugin-node-polyfills/polyfills/url.js

  at error (node_modules/rollup/dist/es/shared/rollup.js:1858:30)
  at Module.error (node_modules/rollup/dist/es/shared/rollup.js:12429:16)
  at Module.traceVariable (node_modules/rollup/dist/es/shared/rollup.js:12788:29)
  at ModuleScope.findVariable (node_modules/rollup/dist/es/shared/rollup.js:11440:39)
  at FunctionScope.findVariable (node_modules/rollup/dist/es/shared/rollup.js:6372:38)
  at ChildScope.findVariable (node_modules/rollup/dist/es/shared/rollup.js:6372:38)
  at TrackingScope.findVariable (node_modules/rollup/dist/es/shared/rollup.js:6372:38)
  at BlockScope.findVariable (node_modules/rollup/dist/es/shared/rollup.js:6372:38)
  at TrackingScope.findVariable (node_modules/rollup/dist/es/shared/rollup.js:6372:38)
  at BlockScope.findVariable (node_modules/rollup/dist/es/shared/rollup.js:6372:38)

I ended up adding punycode with yarn add -D punycode to fix the issue.

Any help would be appreciated, as I'm not entirely sure this issue comes from this repo!

Baroshem commented 1 year ago

Hey,

This is an issue that was part of #119 workaround fix made by me. Thanks to Pooya now, you should be able to use same functionality without these issues by using version 1.5.0 (just released that).

Let me know if the problem is still there :)

quentint commented 1 year ago

Wow, now that's quick!

Thanks 🥳

Baroshem commented 1 year ago

I was working on few features for the 1.5.0 so you just asked this while I was publishing a new version

This is what you call: "Just in Time" ;)