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

4.9.0 fails with "Cannot find module './camel-case' or its corresponding type declarations" #786

Closed
mperdikeas opened this issue Dec 29, 2023 · 1 comment

Comments

@mperdikeas
Copy link

mperdikeas commented Dec 29, 2023

typescript@5.3.2 type-fest@4.9.0 fails with the following messages:

Cannot find module './source/camel-case' or its corresponding type declarations. (6 instances of this error)
Cannot find module './source/join' or its corresponding type declarations. (1 instance of this error)

Indeed, looking at the node-modules directory it does appear these files are missing:

$ ls node_modules/type-fest/source/camel*
.... 1159 Oct 26  1985 node_modules/type-fest/source/camel-cased-properties-deep.d.ts
...  798 Oct 26  1985 node_modules/type-fest/source/camel-cased-properties.d.ts
$ ls node_modules/type-fest/source/join*
ls: cannot access 'node_modules/type-fest/source/join*': No such file or directory

I have no explanation or mental modal as to how it is even possible that these files are missing since I have version 4.9.0 and the files appear on the github.com view of the repo (but not in my local node-modules).

$ npm ls --depth=0 | grep type-fest
├── type-fest@4.9.0

tsconfig.json is:

{
  "compilerOptions": {
    "target": "ES2020",
    "useDefineForClassFields": true,
    "lib": ["ES2020", "DOM", "DOM.Iterable"],
    "module": "ESNext",
   
    /* Bundler mode */
    "moduleResolution": "bundler",
    "allowImportingTsExtensions": true,
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react-jsx",

    /* Linting */
    "strict": true,
    "strictNullChecks": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noFallthroughCasesInSwitch": true,
    "baseUrl": "src",
    "paths": {
      "react"           : [ "./node_modules/@types/react" ],
      "@models/*"       : ["models/*"], /* cf.: sse-1703181070 */
      "@assets/*"       : ["assets/*"],
      "@util/*"         : ["util/*"  ],
      "@backend-api/*"  : ["backend-api/*"  ],
    }

  },
  "include": ["src"],
  "references": [{ "path": "./tsconfig.node.json" }]
}

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • The funding will be given to active contributors.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@mperdikeas
Copy link
Author

false; I had a patch operating which tampered with the contents of the node-modules/type-fest directory. 4.9.0 compiles cleanly.

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

No branches or pull requests

1 participant