Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql MAC OS-错误:找不到模块postgres驱动程序_Sql_Node.js_Postgresql_Typeorm - Fatal编程技术网

Sql MAC OS-错误:找不到模块postgres驱动程序

Sql MAC OS-错误:找不到模块postgres驱动程序,sql,node.js,postgresql,typeorm,Sql,Node.js,Postgresql,Typeorm,我只是将我的电脑从windows改为mac,并尝试启动基于windows的服务器应用程序 postgresql并收到此错误:错误:找不到模块“../driver/postgres/PostgresDriver”。 我安装了typeorm和pg,安装了postgres,但我收到了这个消息 希望有人能帮助我 全部错误: Error: Cannot find module '../driver/postgres/PostgresDriver' Require stack: - /Users/ohads

我只是将我的电脑从windows改为mac,并尝试启动基于windows的服务器应用程序 postgresql并收到此错误:错误:找不到模块“../driver/postgres/PostgresDriver”。 我安装了typeorm和pg,安装了postgres,但我收到了这个消息

希望有人能帮助我

全部错误:

Error: Cannot find module '../driver/postgres/PostgresDriver'
Require stack:
- /Users/ohadsahar/Documents/Development/my_app/server/node_modules/typeorm/schema-builder/RdbmsSchemaBuilder.js
- /Users/ohadsahar/Documents/Development/my_app/server/node_modules/typeorm/driver/sqlserver/SqlServerDriver.js
- /Users/ohadsahar/Documents/Development/my_app/server/node_modules/typeorm/migration/MigrationExecutor.js
- /Users/ohadsahar/Documents/Development/my_app/server/node_modules/typeorm/connection/Connection.js
- /Users/ohadsahar/Documents/Development/my_app/server/node_modules/typeorm/connection/ConnectionManager.js
- /Users/ohadsahar/Documents/Development/my_app/server/node_modules/typeorm/index.js
- /Users/ohadsahar/Documents/Development/my_app/server/src/api/models/user.model.ts
- /Users/ohadsahar/Documents/Development/my_app/server/src/api/services/auth.service.ts
- /Users/ohadsahar/Documents/Development/my_app/server/src/api/controllers/auth.controller.ts
- /Users/ohadsahar/Documents/Development/my_app/server/src/api/routes/auth.routes.ts
- /Users/ohadsahar/Documents/Development/my_app/server/src/api/routes/index.ts
- /Users/ohadsahar/Documents/Development/my_app/server/src/app.ts
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
    at Function.Module._load (internal/modules/cjs/loader.js:842:27)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/Users/ohadsahar/Documents/Development/my_app/server/src/schema-builder/RdbmsSchemaBuilder.ts:17:1)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
Waiting for the debugger to disconnect...

帮帮我们。请复制粘贴您得到的确切错误,不要近似,不要说“我有错误”。如果可能的话,带足够的代码,我们可以尝试重现问题,或者识别问题,这一点很重要。刚刚添加了所有错误
typeorm
依赖项是否有任何特定的安装要求,比如在旁边安装驱动程序?你可能错过了一步。您安装的
typeorm
或特定版本有一个bug。是否有最小的
package.json
复制了此问题?刚刚添加了package.json,请在此处帮助我们。请复制粘贴您得到的确切错误,不要近似,不要说“我有错误”。如果可能的话,带足够的代码,我们可以尝试重现问题,或者识别问题,这一点很重要。刚刚添加了所有错误
typeorm
依赖项是否有任何特定的安装要求,比如在旁边安装驱动程序?你可能错过了一步。您安装的
typerm
或特定版本的
typerm
有一个bug。是否存在复制此问题的最小
package.json
?刚刚添加了package.json
{
  "name": "my_app_server",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "jest",
    "build": "npm run build-ts && npm run copy-static-assets",
    "start": "node dist/app.js",
    "build-ts": "tsc",
    "watch-ts": "npm run copy-static-assets && tsc -w",
    "watch-node": "nodemon",
    "watch": "concurrently -k -p \"[{name}]\" -n \"TypeScript,Node\" -c \"yellow.bold,cyan.bold,green.bold\" \"npm run watch-ts\" \"npm run watch-node\"",
    "run-ts": "ts-node src/app.ts",
    "copy-static-assets": "ts-node copyStaticAssets.ts",
    "start:idea": "ts-node $NODE_DEBUG_OPTION --ignore false src/app.ts --env=dev",
    "migration:generate": "ts-node ./node_modules/typeorm/cli migration:generate -n migration -d src/migration -f ./src/config/orm.config.ts",
    "migration:run": "ts-node ./node_modules/typeorm/cli migration:run -f ./src/config/orm.config.ts"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@sendgrid/mail": "^7.2.0",
    "@types/bcryptjs": "^2.4.2",
    "@types/node": "12.11.7",
    "@types/passport": "1.0.0",
    "aws-sdk": "2.463.0",
    "bcrypt-nodejs": "0.0.3",
    "bcryptjs": "^2.4.3",
    "body-parser": "^1.18.3",
    "chance": "^1.1.4",
    "class-transformer": "^0.2.3",
    "class-validator": "^0.11.0",
    "concurrently": "^4.1.0",
    "cors": "^2.8.5",
    "del": "^4.1.1",
    "dotenv": "^8.0.0",
    "express": "^4.16.4",
    "helmet": "^3.21.2",
    "http-status-codes": "^1.3.0",
    "lodash": "^4.17.15",
    "minimist": "^1.2.0",
    "moment": "^2.23.0",
    "morgan": "^1.9.1",
    "multer": "^1.4.2",
    "mysql": "^2.16.0",
    "nodemailer": "^5.0.0",
    "nodemailer-sendgrid-transport": "^0.2.0",
    "passport": "^0.4.0",
    "passport-jwt": "^4.0.0",
    "pg": "^8.0.3",
    "plivo": "^4.6.0",
    "reflect-metadata": "^0.1.12",
    "shelljs": "^0.8.3",
    "typedi": "^0.8.0",
    "typeorm": "0.2.19",
    "typeorm-typedi-extensions": "^0.2.1",
    "winston": "^3.1.0"
  },
  "devDependencies": {
    "@types/bcrypt-nodejs": "0.0.30",
    "@types/bluebird": "^3.5.25",
    "@types/cors": "2.8.6",
    "@types/csv-parse": "^1.1.11",
    "@types/email-templates": "^3.5.0",
    "@types/express": "4.16.0",
    "@types/express-serve-static-core": "4.16.0",
    "@types/helmet": "0.0.42",
    "@types/lodash": "^4.14.119",
    "@types/minimist": "^1.2.0",
    "@types/moment": "^2.13.0",
    "@types/moment-timezone": "^0.5.12",
    "@types/morgan": "^1.7.35",
    "@types/multer": "^1.4.3",
    "@types/nodemailer": "^4.6.5",
    "@types/papaparse": "^4.5.7",
    "@types/passport-jwt": "^3.0.1",
    "@types/pug": "^2.0.4",
    "@types/shelljs": "^0.8.1",
    "@types/winston": "^2.4.4",
    "ts-node": "^7.0.1",
    "tsconfig-paths": "^3.8.0",
    "typescript": "^3.7.5"
  }
}