When learning typescript, you want to execute the TS file. First install the TS package, then use the TSC command to execute it, compile it into a JS file, and use node xxx.js to execute it. However, this is troublesome. Later, you want to use TS node to directly execute it and simplify the steps. An error is reported:
It is found that the corresponding package needs to be installed to compile:
Solution: npm install -D tslib @types/node
- Ts-node Error: return new TSError(diagnosticText, diagnosticCodes);
- Typescript error: TSError: x Unable to compile TypeScript…
- [Solved] typescript Error: Cannot find name ‘__dirname‘
- Vue installs sass loader directly, and node sass reports an error
- [Solved] Node sass version 7.0.0 is incompatible with ^ 4.0.0 | ^ 5.0.0 | ^ 6.0.0
- Vue project Run Error: Syntax Error： Error: Cannot find module ‘less‘
- Error: Cannot find module ‘./application‘ [How to Solve]
- [Solved] Error: Can‘t find Python executable “python“, you can set the PYTHON env variable.
- NPM run dev runs the Vue project and reports an error: Node Sass does not yet support your current environment
- [Solved] NPM Error: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed
- [Solved] Cnpm installation [email protected] view/cli Error: error: eperm: operation not allowed…
- Node.js Error: Cannot find module express [How to Solve]
- [Solved] NPM err! Cannot read property ‘parent’ of null npm ERR! A complete log of this run can be found in: npm ERR!
- [Solved] Syntax Error: Error: Node Sass does not yet support your current environment:
- How to Solve NPM installation -g @view/client Error
- [Solved] Vue3 npm ERR code ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC
- [Solved] Vue Error: Module build failed Error Node Sass version 6.0.1 is incompatible with ^4.0.0.
- Error: Rule can only have one resource source (provided resource and test + include + exclude)
- [Solved] VUE npm install Error: Module build failed: Error: ENOENT: no such file or directory, scandir