Comments (7)
Thanks for bringing this to my attention.
I learned recently that there's a backwards compatible solution I can implement in this package that wouldn't require that node16
change. There's almost no downsides for me.
I aim to make that change soon, that should prevent this issue from occurring again and you'll be able to go back to using node
module resolution if it benefits you.
from electron-trpc.
Hey, thanks for raising the issue.
What tooling is giving you the error? TypeScript? Eslint? A packager?
Please note that the exposeElectronTRPC
import is from electron-trpc/main
, as the current GitHub README shows.
from electron-trpc.
What tooling is giving you the error? TypeScript? Eslint? A packager?
Not sure. I'm using the electron-react-webpack-typescript-2022 template and I'm simply running npm run start
. Guess it's Typescript?
Please note that the exposeElectronTRPC import is from electron-trpc/main, as the current GitHub README shows.
Sorry, that was a typo. Fixed it now.
from electron-trpc.
Here's what node_modules/electron-trpc/
looks like:
│ LICENSE
│ package.json
│
├───dist
│ main.cjs
│ main.d.ts
│ main.mjs
│ renderer.cjs
│ renderer.d.ts
│ renderer.mjs
│
└───src
│ constants.ts
│ types.ts
│
├───main
│ │ createIPCHandler.ts
│ │ exposeElectronTRPC.ts
│ │ index.ts
│ │ resolveIPCResponse.ts
│ │ utils.ts
│ │ vite.config.ts
│ │
│ └───__tests__
│ resolveIPCResponse.test.ts
│
└───renderer
index.ts
ipcLink.ts
tsconfig.json
utils.ts
vite.config.ts
from electron-trpc.
Can you try changing moduleResolution
in tsconfig.json
from node
to node16
?
from electron-trpc.
That fixed it. Thanks!
from electron-trpc.
This is fixed in [email protected]
in case you want to continue using node
module resolution in TS.
from electron-trpc.
Related Issues (20)
- Add README and package meta to published package
- Respond should send back to sender rather than all windows HOT 3
- Not compatible with default sandbox mode of Electron 20+ HOT 2
- `subscription.stop` method has no `input`, causing crash with superjson transformer HOT 1
- Subscription returns `undefined` with superjson HOT 2
- Subscriptions do not cleanup HOT 9
- How to use electron-trpc with Jest? HOT 2
- Query never resolves when the input is undefined HOT 2
- handleIPCMessage only sends replies to electron main frame HOT 4
- [Discussion] Roadmap to v1.0.0 HOT 3
- App crashes with "Object has been destroyed" error HOT 3
- No way to access window from request
- Risk for memory leaks with subscriptions on page reload HOT 4
- Add support for different router types
- Invalid mjs bundle: `contextBridge` shouldn't be imported in `main.mjs` HOT 1
- TRPC 11.x.x (next) introduces breaking changes that will break electron-trpc HOT 3
- Dependency Dashboard
- `process is not defined` after importing ipcLink in renderer HOT 10
- Bug: Type of `createContext` must always be async
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-trpc.