0
My project is giving this error message;
Why is my project not recognizing my http?
I’m new, and I’m still learning to code in Express.
This is my package.json;
{
  "name": "registre",
  "version": "1.0.0",
  "description": "API",
  "main": "server/server.ts",
  "scripts": {
    "start": "./node_modules/.bin/ts-node/ ./server/server.ts",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "Wladimir",
  "license": "ISC",
  "dependencies": {
    "body-parser": "^1.18.3",
    "express": "^4.16.3",
    "http": "0.0.0",
    "morgan": "^1.9.0",
    "pg": "^7.4.3",
    "sequelize-cli": "^4.1.1"
  },
  "devDependencies": {
    "@types/body-parser": "^1.17.0",
    "@types/express": "^4.16.0",
    "@types/morgan": "^1.7.35",
    "@types/sequelize": "^4.27.25",
    "sequelize": "^4.38.0",
    "ts-node": "^7.0.1"
  }
}

This problem ai ta related to typescript, because in Babel the same syntax presents no problem. Do not use typescript there do not know what problem kkkk sorry.
– Chance
maybe typescript needs to be installed globally on the operating system, knows which is the command to see which version of typescript is installed on my pc?
– wladyband
tsc -v, but I don’t think you need to use theasonly theimport http from 'http'already resolves.– Chance
strange, my typescript is installed globally
Version 3.0.1– wladyband
So use as I said, without the as, there is no need in this context. And http is the default package.
– Chance
made the same mistake.
– wladyband
Let’s go continue this discussion in chat.
– Chance