ts-node@7 doesn't work with custom module declaration file, but ts-node@6 works fine with the same project:
Here are my files:
1) /tsconfig.json
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"lib": ["es2017", "dom"],
"sourceMap": true,
"outDir": "./dist",
"strict": true,
"moduleResolution": "node",
"noUnusedLocals": true,
"noUnusedParameters": true
},
"include": ["src/**/*", "scripts/**/*"]
}
2) My custom module declarations, /src/typings.d.ts
declare module "ethereumjs-tx"
declare module "agendash"
3) Script line from package.json, how I run it:
"start": "nodemon --watch src --ext ts --exec ts-node src"
It works fine with ts-node@6, also it compiles with tsc.
But with ts-node@7 there is an error:
TSError: ⨯ Unable to compile TypeScript:\
src/utils/ethereum.utils.ts(3,21): error TS7016: Could not find a declaration file for module 'ethereumjs-tx'
Please search existing issues, read the changelog, read the README before opening a duplicate issue.
@blakeembrey maybe say what it is a duplicate of?
@Haxified1 On mobile it would take me a long time and I'm continuously repeating myself. Should the onus not be on the person reporting to deduplicate? Here's a link to the last closed related issues: https://github.com/TypeStrong/ts-node/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aclosed+files
Most helpful comment
@Haxified1
With a new version of ts-node I've changed for my projects:
ts-node@6:
ts-node src/index.tsts-node@7:
ts-node --files src/index