Skip to content

Commit 499b256

Browse files
authored
Merge docs for v10.8.0 release (#1763)
* Update options.md * Update troubleshooting.md * Update options.md (#1734) * Update docusaurus.config.js (#1740)
1 parent 6f66541 commit 499b256

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

Diff for: website/docs/options.md

+3
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,13 @@ Bootstrap with the ESM loader, enabling full ESM support
7676

7777
```shell
7878
ts-node -P <path/to/tsconfig>
79+
ts-node --project <path/to/tsconfig>
7980
```
8081

8182
Path to tsconfig file.
8283

84+
*Note the uppercase `-P`. This is different from `tsc`'s `-p/--project` option.*
85+
8386
*Environment:* `TS_NODE_PROJECT`
8487

8588
### skipProject

Diff for: website/docs/troubleshooting.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ This error is thrown by node when a module is `require()`d, but node believes it
9393
- You have installed an ESM dependency but your own code compiles to CommonJS.
9494
- Solution: configure your project to compile and execute as native ESM. [Docs](./commonjs-vs-native-ecmascript-modules.md#native-ecmascript-modules)
9595
- Solution: downgrade the dependency to an older, CommonJS version.
96-
- You have moved your project to ESM but still have a config file, such as `webpack.config.js`, which must be executed as CommonJS
97-
- Solution: if supported by the relevant tool, rename your config file to `.cjs`
96+
- You have moved your project to ESM but still have a config file, such as `webpack.config.ts`, which must be executed as CommonJS <!-- SYNC_WITH_MTO_DOCS -->
97+
- Solution: if supported by the relevant tool, rename your config file to `.cts`
9898
- Solution: Configure a module type override. [Docs](./module-type-overrides.md)
9999
- You have a mix of CommonJS and native ESM in your project
100100
- Solution: double-check all package.json "type" and tsconfig.json "module" configuration [Docs](./commonjs-vs-native-ecmascript-modules.md)
101-
- Solution: consider simplifying and switch to all CommonJS or all native ESM
101+
- Solution: consider simplifying by making your project entirely CommonJS or entirely native ESM
102102
103103
### `ERR_UNKNOWN_FILE_EXTENSION`
104104
@@ -109,6 +109,9 @@ This error is thrown by node when a module has an unrecognized file extension, o
109109
- Solution: upgrade to ts-node >=[v10.6.0](https://github.com/TypeStrong/ts-node/releases/tag/v10.6.0), which implements a workaround.
110110
- Our ESM loader is not installed.
111111
- Solution: Use `ts-node-esm`, `ts-node --esm`, or add `"ts-node": {"esm": true}` to your tsconfig.json. [Docs](./commonjs-vs-native-ecmascript-modules.md#native-ecmascript-modules)
112+
- You have moved your project to ESM but still have a config file, such as `webpack.config.ts`, which must be executed as CommonJS <!-- SYNC_WITH_MTO_DOCS -->
113+
- Solution: if supported by the relevant tool, rename your config file to `.cts`
114+
- Solution: Configure a module type override. [Docs](./module-type-overrides.md)
112115
113116
## Missing Types
114117

Diff for: website/docusaurus.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module.exports = {
5050
position: 'right',
5151
},
5252
{
53-
href: 'https://discord.gg/typescript',
53+
href: 'https://discord.gg/3rBctmf3dP',
5454
label: 'Chat',
5555
position: 'right',
5656
},

0 commit comments

Comments
 (0)