Hi, I have include a definition file for node by running following command: npm install --save-dev @types/node<SPAN class="" style="color: var(--black-750); border: 0px; font-weight: inherit; font-size: 13px;"><BR /></SPAN>Also included it in package.json:
"devDependencies": {
"@types/arcgis-js-api": "^4.12.0",
"@types/node": "^14.6.0",
"dojo-typings": "1.11.9",
"npm-run-all": "^4.1.3",
"reload": "2.3.1",
"rimraf": "^2.6.2",
"typescript": "3.9.7"
}
When execute this line of code "const fs=require("fs");", it looks for the module in JS 4.12 instead of "node", and complains "undefinedModule".
Any ideas?
Regards
Rose