Using InstantSearch in typescript requires to install places.js since v4.52.0
bidoubiwa opened this issue Β· comments
π Current behavior
When upgrading instantsearch.js
to v.52 > with typescript, the places.js
module is not found:
Cannot find module 'places.js' or its corresponding type declarations.
Similar to this issue: #4911 but with places.js
.
When I add places.js
in my packages, it works.
π Steps to reproduce
- open new directory
In the terminal:
$ npm init -y
$ npx tsc --init
$ yarn add @types/node --save-dev
$ yarn add instantsearch.js
- Create index.ts file with the following content:
import instantsearch from "instantsearch.js";
console.log(instantsearch)
- run
npx tsc -p tsconfig.json
Live reproduction
https://github.com/bidoubiwa/instantsearch-v4.52.0-ts
π Expected behavior
No errors, or maybe add it in the peerDependencies
Package version
instantsearch.js 5.53.0
Operating system
macOs 13.2.1
Browser
/
Code of Conduct
- I agree to follow this project's Code of Conduct
This is very weird, I see no reason why this would be different between 4.51.1 and 4.52.0
Me neither, I looked at every commit to understand why but couldn't find anything relevant.
It was because of #5508 where the imports were ordered, but the ts-ignore for places didn't move with its corresponding import.
good catch! Thanks π