Coder Social home page Coder Social logo

Comments (7)

jsonnull avatar jsonnull commented on May 22, 2024 1

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.

jsonnull avatar jsonnull commented on May 22, 2024

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.

joaobzrr avatar joaobzrr commented on May 22, 2024

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.

joaobzrr avatar joaobzrr commented on May 22, 2024

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.

jsonnull avatar jsonnull commented on May 22, 2024

Can you try changing moduleResolution in tsconfig.json from node to node16?

from electron-trpc.

joaobzrr avatar joaobzrr commented on May 22, 2024

That fixed it. Thanks!

from electron-trpc.

jsonnull avatar jsonnull commented on May 22, 2024

This is fixed in [email protected] in case you want to continue using node module resolution in TS.

from electron-trpc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.