Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(i18next): Fix augments #471

Closed
wants to merge 1 commit into from
Closed

fix(i18next): Fix augments #471

wants to merge 1 commit into from

Conversation

swiizyy
Copy link
Contributor

@swiizyy swiizyy commented Aug 24, 2023

Repair of module de Declarations that do not work after the last update.

@favna
Copy link
Member

favna commented Aug 24, 2023

It should still work with the latest update, unless you're not calling the /register import...

@swiizyy
Copy link
Contributor Author

swiizyy commented Aug 24, 2023

It should still work with the latest update, unless you're not calling the /register import...

Unfortunately no it doesn't work... 🤷‍♂️

@favna
Copy link
Member

favna commented Aug 24, 2023

23-19-34_24-08-2023_Code.mp4

It works just fine for me

{
  "name": "with-typescript-recommended",
  "version": "1.0.0",
  "main": "dist/index.js",
  "author": "@sapphire",
  "license": "UNLICENSE",
  "type": "module",
  "dependencies": {
    "@sapphire/decorators": "^6.0.2",
    "@sapphire/discord-utilities": "^3.1.0",
    "@sapphire/discord.js-utilities": "7.0.1",
    "@sapphire/fetch": "^2.4.1",
    "@sapphire/framework": "^4.5.3",
    "@sapphire/plugin-api": "^5.1.1",
    "@sapphire/plugin-editable-commands": "^3.0.3",
    "@sapphire/plugin-logger": "^3.0.6",
    "@sapphire/plugin-subcommands": "^4.2.0",
    "@sapphire/time-utilities": "^1.7.10",
    "@sapphire/type": "^2.4.0",
    "@sapphire/utilities": "^3.13.0",
    "@skyra/env-utilities": "^1.2.1",
    "colorette": "^2.0.20",
    "discord-api-types": "^0.37.54",
    "discord.js": "^14.13.0"
  },
  "devDependencies": {
    "@sapphire/plugin-i18next": "^5.0.5",
    "@sapphire/prettier-config": "^2.0.0",
    "@sapphire/ts-config": "^4.0.1",
    "@types/node": "^20.5.4",
    "@types/ws": "^8.5.5",
    "prettier": "^3.0.2",
    "tsc-watch": "^6.0.4",
    "typescript": "^5.1.6"
  },
  "scripts": {
    "build": "tsc",
    "watch": "tsc -w",
    "start": "node --preserve-symlinks dist/index.js",
    "dev": "yarn build && yarn start",
    "watch:start": "tsc-watch --onSuccess \"yarn start\"",
    "format": "prettier --write ."
  },
  "packageManager": "yarn@3.6.2"
}
{
  "extends": "@sapphire/ts-config/extra-strict",
  "compilerOptions": {
    "rootDir": "src",
    "outDir": "dist",
    "moduleResolution": "node16",
    "tsBuildInfoFile": "dist/.tsbuildinfo"
  },
  "include": ["src"]
}

@DemonWayne
Copy link
Contributor

I think the issue is in tsconfig. In my case, setting moduleResolution to node16 (wasNode) helped to get rid of registry error.

@favna
Copy link
Member

favna commented Aug 25, 2023

I think the issue is in tsconfig. In my case, setting moduleResolution to node16 (wasNode) helped to get rid of registry error.

Potentially Swizzy updated to TS 5.2 without accounting for the breaking changes it introduced which would explain it. His issue will then also be resolved by sapphiredev/utilities#637

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants