Open nite opened 4 years ago
Hi, thanks for reporting this.
For the typing issue, did you happen to install the demo dependencies via npm
not yarn
?
We've seen an issue where @types/react-router-dom v5.1.3
has been installed when the package-lock.json` stipulates that v.5.0.0 should be installed. If you install via yarn, that lockfile is ignored, we should probably tie that dependency down.
From the looks of the second typing issue, it seems like your TSC/IDE is still using the old useBound
typings, does the index.d.ts
file in the root of the repo directory show useBounds
returning an array type on line 70?
Sorry for delay on this - I've installed with npm now, however I'm getting this:
./src/pages/bounds/Bounds.tsx
Module not found: Can't resolve 'openfin-react-hooks' in '/home/andyc/work/bmll/tmp/openfin-react-hooks/demo/src/pages/bounds'
I've re-run npm i openfin-react-hooks -D
for good measure.
Typing looks good on useBound now:
export const useBounds: (target?: _Window) => [
Bounds | undefined,
(newBounds: Bounds) => Promise<void>
];
Switching back to node 12 (from 13) & got the app running. I've run it with npm start
in 1 terminal & npm run launch
in another.
Now, if I click on anything, I get a white screen - cant load devtools, app just crashes. Nothing running on localhost:9090.
Worth mentioning, I get this on npm run launch
:
using config /Users/andyc/dev/openfin/openfin-react-hooks/demo/public/app.dev.json
Error: Failed to load url: https://app-directory.openfin.co/api/v1/apps/layouts, status code:404
I have a single openfin-react-hook running now in starter-typescript-react-sass, so hopefully I'm underway with kicking the tyres a bit more in the meantime.
Not seen that layouts 404 issue before, might be something up with openfin, do you still see it?
With regards to the cannot resolve openfin-react-hooks, you may need to run a npm run compile
in the root directory to do a first-time compile of the hooks before using them.
Node v14.18.2 npm 6.14.15
PS D:\github\openfin-react-hooks> npm run compile
> openfin-react-hooks@2.0.3 compile D:\github\openfin-react-hooks
> tsc
../node_modules/@types/prettier/index.d.ts:537:14 - error TS2456: Type alias 'Doc' circularly references itself.
537 type Doc = string | Doc[] | DocCommand;
Hi,
Spinning up your demo app, firstly I get this:
fixed with:
export default withRouter(App);
Now, I'm blocked by:
any ideas?
typescript version: