Closed imballinst closed 10 months ago
Hello, thanks for creating this awesome package, really appreciate it!
So I've been playing with this package recently, and I noticed that I when importing meow, I had this error:
meow
Cannot find module 'meow' or its corresponding type declarations.ts(2307)
Repro can be seen here: https://codesandbox.io/p/sandbox/nervous-silence-gdmsnv?file=%2Fsrc%2Findex.ts%3A11%2C1. Curiously, if I add "types": "./build/index.d.ts" in the node_modules directly, the error will be gone.
"types": "./build/index.d.ts"
Is there something that I might be missing here? Thanks!
EDIT: this is the example if I "patch" the package.json directly: https://codesandbox.io/p/sandbox/zealous-jerry-z3cwml?file=%2Fsrc%2Findex.ts%3A2%2C22, notice that there is no red line under the "meow" import.
package.json
"meow"
https://github.com/sindresorhus/meow/pull/246
https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
oh wow, using moduleResolution: "node16" actually works! Apologies, I missed (or forgot) that part of the guide. Thanks for the references @sindresorhus!
moduleResolution: "node16"
Hello, thanks for creating this awesome package, really appreciate it!
So I've been playing with this package recently, and I noticed that I when importing
meow
, I had this error:Repro can be seen here: https://codesandbox.io/p/sandbox/nervous-silence-gdmsnv?file=%2Fsrc%2Findex.ts%3A11%2C1. Curiously, if I add
"types": "./build/index.d.ts"
in the node_modules directly, the error will be gone.Is there something that I might be missing here? Thanks!
EDIT: this is the example if I "patch" the
package.json
directly: https://codesandbox.io/p/sandbox/zealous-jerry-z3cwml?file=%2Fsrc%2Findex.ts%3A2%2C22, notice that there is no red line under the"meow"
import.