chalk / chalk

🖍 Terminal string styling done right
MIT License
21.97k stars 858 forks source link

Cannot find module 'chalk' or its corresponding type declarations. #419

Closed thisVioletHydra closed 4 years ago

thisVioletHydra commented 4 years ago

"typescript": "^4.0.5",

image

Qix- commented 4 years ago

There's absolutely no way I can begin to diagnose your problem with a single image and an unrelated dependency declaration.

Please give us more information. If you don't know how to use package.json, please consult other resources as this is primarily a bug tracker (and this is surely not a bug with Chalk).

thisVioletHydra commented 4 years ago

There's absolutely no way I can begin to diagnose your problem with a single image and an unrelated dependency declaration.

Please give us more information. If you don't know how to use package.json, please consult other resources as this is primarily a bug tracker (and this is surely not a bug with Chalk).

 "dependencies": {
    "axios": "0.21.0",
    "chalk": "^4.1.0",
    "clean-webpack-plugin": "^3.0.0",
    "cors": "^2.8.5",
    "crypto-js": "^4.0.0",
    "defer-to-connect": "^2.0.0",
    "dotenv-webpack": "^5.0.1",
    "email-templates": "^7.1.2",
    "eslint-plugin-node": "^11.1.0",
    "express": "^4.17.1",
    "fast-async": "^6.3.8",
    "fast-xml-parser": "3.17.4",
    "friendly-errors-webpack-plugin": "^1.7.0",
    "helmet": "^4.2.0",
    "lodash": "4.17.20",
    "module-alias": "^2.2.2",
    "moment": "2.29.1",
    "mongodb": "3.6.2",
    "mongoose": "5.10.12",
    "node-dev": "6.2.0",
    "node-notifier": "8.0.0",
    "nodemailer": "6.4.14",
    "npm-run-all": "^4.1.5",
    "pug": "^3.0.0",
    "terser-webpack-plugin": "5.0.3",
    "ts-loader": "8.0.9",
    "ts-node": "^9.0.0",
    "typescript": "^4.0.5",
    "uuid": "8.3.1",
    "validate.js": "^0.13.1",
    "webpack": "5.4.0",
    "webpack-cli": "4.2.0",
    "webpack-node-externals": "2.5.2",
    "webpackbar": "^4.0.0",
    "yarn-check": "^0.0.3"
  },
  "devDependencies": {
    "@babel/cli": "7.12.1",
    "@babel/core": "7.12.3",
    "@babel/node": "7.12.6",
    "@babel/preset-env": "7.12.1",
    "@types/body-parser": "^1.19.0",
    "@types/bson": "^4.0.3",
    "@types/cors": "^2.8.8",
    "@types/crypto-js": "^4.0.1",
    "@types/dotenv-webpack": "^5.0.0",
    "@types/express": "^4.17.8",
    "@types/friendly-errors-webpack-plugin": "^0.1.2",
    "@types/mongoose": "^5.7.36",
    "@types/node": "^14.14.6",
    "@types/node-notifier": "^8.0.0",
    "@types/webpack-node-externals": "^2.5.0",
    "@types/webpackbar": "^4.0.0",
    "@typescript-eslint/parser": "^4.6.1",
    "babel-eslint": "10.1.0",
    "babel-loader": "^8.1.0",
    "babel-plugin-module-resolver": "^4.0.0",
    "babel-plugin-syntax-dynamic-import": "^6.18.0",
    "babel-preset-airbnb": "^5.0.0",
    "cache-loader": "^4.1.0",
    "cross-env": "7.0.2",
    "eslint": "7.12.1",
    "eslint-config-airbnb-base": "14.2.0",
    "eslint-config-prettier": "6.15.0",
    "eslint-import-resolver-babel-module": "^5.1.2",
    "eslint-import-resolver-webpack": "^0.13.0",
    "eslint-plugin-import": "2.22.1",
    "eslint-plugin-jsdoc": "30.7.7",
    "eslint-plugin-json": "^2.1.2",
    "eslint-plugin-package-json": "^0.1.4",
    "eslint-plugin-prettier": "3.1.4",
    "eslint-plugin-promise": "^4.2.1",
    "prettier": "2.1.2"
  },
  "optionalDependencies": {
    "fsevents": "^2.1.2"
  },
  "resolutions": {
    "@types/webpack": "^4.41.24"
  }

node -v v14.14.0

thisVioletHydra commented 4 years ago

I created a new file, transferred the import there and the error disappeared for some reason 😢 image

Qix- commented 4 years ago

Seems like an issue with your build config. There isn't anything we can do to debug this for you; check the webpack issue tracker or StackOverflow, as I doubt this has anything to do with chalk.