You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, could you provide more detailed steps how to reproduce this? I just did the following (with node v18.18.2 and deepl-node v1.13.0) in a new directory:
npm create svelte@latest test-app
cd test-app
npm add deepl-node
npm install
Edit src/app.d.ts to look like the following
import*asdeeplfrom'deepl-node';// See https://kit.svelte.dev/docs/types#app// for information about these interfacesdeclareglobal{namespaceApp{// interface Error {}// interface Locals {}// interface PageData {}// interface PageState {}// interface Platform {}}}asyncfunctiontranslate(){lett=deepl.Translator('auth_key');letresult=awaitt.translateText('sample text',null,'de');returnresult;}export{};
Hi, I don't have access to my code right now, but it didn't show up on a dev server, only on a full prod build (npm run build).
It's pretty easy to spot though, the index.js file imports stuff from parsing.js, and parsing.js also imports stuff from index.js, thus creating a circular import.
It's not a big problem as you only import specific functions from one another but it's just a "bad practice", hence the warning
Activity
JanEbbing commentedon Apr 22, 2024
Hi, could you provide more detailed steps how to reproduce this? I just did the following (with node v18.18.2 and deepl-node v1.13.0) in a new directory:
npm create svelte@latest test-appcd test-appnpm add deepl-nodenpm installsrc/app.d.tsto look like the followingAnd I dont get this warning.
WarningImHack3r commentedon Apr 22, 2024
Hi, I don't have access to my code right now, but it didn't show up on a dev server, only on a full prod build (
npm run build).It's pretty easy to spot though, the index.js file imports stuff from parsing.js, and parsing.js also imports stuff from index.js, thus creating a circular import.
It's not a big problem as you only import specific functions from one another but it's just a "bad practice", hence the warning
JanEbbing commentedon Apr 22, 2024
Ah sorry, I didn't get that it's just a warning. I agree, we should move a bunch of definitions into
types.ts. I'll take a look.WarningImHack3r commentedon Apr 22, 2024
Sorry about the wording, thanks!
JanEbbing commentedon Sep 29, 2025
This is fixed after some refactoring