Answer the question
In order to leave comments, you need to log in
child_process import disappear?
In index.ts I write import cp from "child_process";
, I write tsc, in index.js this is no longer there (target & module = esnext)
Answer the question
In order to leave comments, you need to log in
Everything, of course, works.
Here is the minimal config for you:
package.json:
{
"name": "ts",
"version": "1.0.0",
"type": "module",
"main": "index.js",
"module": "index.js",
"license": "MIT",
"dependencies": {
"typescript": "^4.4.4"
},
"devDependencies": {
"@types/node": "^16.11.7"
}
}
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"esModuleInterop": true,
"strict": true
}
}
import cp from "child_process";
console.log(cp);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question