zazoomauro / node-dependency-injection

The NodeDependencyInjection component allows you to standarize and centralize the way objects are constructed in your application.
https://github.com/zazoomauro/node-dependency-injection/wiki
MIT License
280 stars 34 forks source link

Cannot find module 'typescript' only producction #212

Closed milanes1988 closed 3 months ago

milanes1988 commented 4 months ago

I'm using the library and when I update it from v2 to v3 I get the following error.

Error: Cannot find module 'typescript'

Checking the dependencies I find that in the file: node_modules/node-dependency-injection/node_modules/@typescript-eslint/typescript-estree/dist/convert.js:29:25)

const ts = __importStar(require("typescript"));

Check the package.json and there is the library:

"dependencies":{
  "@babel/plugin-transform-runtime":"^7.17.10",
  "@babel/runtime":"^7.17.9",
  "@typescript-eslint/typescript-estree":"^5.23.0",
  "chalk":"^4.1.0",
  "commander":"^8.3.0",
  "console.table":"^0.10.0",
  "js-yaml":"^4.0.0",
  "json5":"^2.2.2",
  "validate-npm-package-name":"^3.0.0"
}

Is this library required to compile without typescript?

zazoomauro commented 3 months ago

@milanes1988 typescript is required for autowiring purposes

milanes1988 commented 3 months ago

@zazoomauro thanks ;)