Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error with instantsearch.js/facet-dropdown #416

Open
stephanemartinw opened this issue Oct 27, 2022 · 4 comments
Open

Build error with instantsearch.js/facet-dropdown #416

stephanemartinw opened this issue Oct 27, 2022 · 4 comments

Comments

@stephanemartinw
Copy link

Hi,

After npm install, npm start return following error :

Server running at http://localhost:3000
馃毃 /Users/stephane.ma/Sites/instantsearch/dropdownfacets/favicon.png: Invalid Version: undefined
at new SemVer (/Users/stephane.ma/Sites/instantsearch/dropdownfacets/node_modules/@babel/preset-env/node_modules/semver/semver.js:314:11)
at compare (/Users/stephane.ma/Sites/instantsearch/dropdownfacets/node_modules/@babel/preset-env/node_modules/semver/semver.js:647:10)
at Function.lt (/Users/stephane.ma/Sites/instantsearch/dropdownfacets/node_modules/@babel/preset-env/node_modules/semver/semver.js:688:10)
at /Users/stephane.ma/Sites/instantsearch/dropdownfacets/node_modules/@babel/preset-env/lib/index.js:273:15
at Object.default (/Users/stephane.ma/Sites/instantsearch/dropdownfacets/node_modules/@babel/helper-plugin-utils/lib/index.js:23:12)
at getEnvPlugins (/Users/stephane.ma/Sites/instantsearch/dropdownfacets/node_modules/parcel-bundler/src/transforms/babel/env.js:62:34)
at getEnvConfig (/Users/stephane.ma/Sites/instantsearch/dropdownfacets/node_modules/parcel-bundler/src/transforms/babel/env.js:12:25)
at async getBabelConfig (/Users/stephane.ma/Sites/instantsearch/dropdownfacets/node_modules/parcel-bundler/src/transforms/babel/config.js:32:19)
at async babelTransform (/Users/stephane.ma/Sites/instantsearch/dropdownfacets/node_modules/parcel-bundler/src/transforms/babel/transform.js:6:16)
at async JSAsset.pretransform (/Users/stephane.ma/Sites/instantsearch/dropdownfacets/node_modules/parcel-bundler/src/assets/JSAsset.js:83:5)

Tahnk you for support,

Stephane

@Haroenv
Copy link
Contributor

Haroenv commented Oct 27, 2022

If you install with Yarn this shouldn't happen, it's a bug in the latest version of parcel. Otherwise if you upgrade that example with parcel instead of parcel-bundler, it should also be fixed.

You can also see the example on https://codesandbox.io/s/github/algolia/doc-code-samples/tree/master/instantsearch.js/facet-dropdown?file=/package.json

Regardless, we should update all examples with the latest bundler, we'll close this issue once that's done

@stephanemartinw
Copy link
Author

Thank you for your quick answer !
Does this mean that you also will update to the latest instantseach.js (in your dropdown-facet sample, 4.9.1 is used, latests is 4.49).
Using latest instantsearch.js, I've the following js error when trying to implement dropdown for RefinementList as on example.

RefinementList.tsx:322 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'templates')
at c.value (RefinementList.tsx:322:57)
at ar (preact.module.js:1:5807)
at Gn (preact.module.js:1:2137)
at ar (preact.module.js:1:6138)
at lr (preact.module.js:1:8272)
at refinement-list.tsx:262:5
at Object.render (connectRefinementList.ts:348:11)
at Object.render (panel.tsx:336:25)
at index.ts:603:18
at Array.forEach ()

Thank you for support,

@Haroenv
Copy link
Contributor

Haroenv commented Nov 2, 2022

Do you have a code sample that replicates this code?

@stephanemartinw
Copy link
Author

Hi Haroenv,

Here is a code sandbox that replicates the issue described previously :
https://codesandbox.io/s/keen-lake-pp46dw

(Please pass the first error due the lack of the expected DOM item before a search is done)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants