MugetsuM
tRPC4y ago
54 replies
Mugetsu

tRPC Client webpack error

As soon as I add the client part to my legacy app i get an error and Can't figure out what is wrong.

Version: webpack 4.35.3
...
ERROR in ./node_modules/.pnpm/@trpc+react-query@10.5.0_d022380f8796fe4307eb66404abcd925/node_modules/@trpc/react-query/dist/createHooksInternal-808efaa7.mjs 127:13
Module parse failed: Unexpected token (127:13)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         path,
|         input,
>         opts?.trpc
|     ];
| }
 @ ./node_modules/.pnpm/@trpc+react-query@10.5.0_d022380f8796fe4307eb66404abcd925/node_modules/@trpc/react-query/dist/index.mjs 4:0-144 17:27-53 26:15-41 30:18-37 39:17-36
 @ ./src/universal/TrpcWrapper.tsx
 @ ./src/renderer.js
 @ ./src/client/index.js

ERROR in ./node_modules/.pnpm/@trpc+client@10.5.0_@trpc+server@10.5.0/node_modules/@trpc/client/dist/index.js 33:24
Module parse failed: Unexpected token (33:24)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|         const { promise , abort  } = observable.observableToPromise(req$);
|         const abortablePromise = new Promise((resolve, reject)=>{
>             opts.signal?.addEventListener('abort', abort);
|             promise.then((envelope)=>{
|                 resolve(envelope.result.data);
 @ ./node_modules/.pnpm/@trpc+react-query@10.5.0_d022380f8796fe4307eb66404abcd925/node_modules/@trpc/react-query/dist/index.mjs 1:0-29 1:0-29
 @ ./src/universal/TrpcWrapper.tsx
 @ ./src/renderer.js
 @ ./src/client/index.js
ℹ 「wdm」: Failed to compile.
Was this page helpful?