Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/41.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
Node.js Angular 4:github项目的本地构建上的错误,该项目以前正在运行_Node.js_Angular - Fatal编程技术网

Node.js Angular 4:github项目的本地构建上的错误,该项目以前正在运行

Node.js Angular 4:github项目的本地构建上的错误,该项目以前正在运行,node.js,angular,Node.js,Angular,所以我在github上有一个项目,我试图升级到Angular 5。。一开始似乎很有效,但后来我发现了一些奇怪的bug,我想继续使用上次提交中的工作。。回到角度4。。但是,当我尝试构建项目时,我不断遇到以下错误: ERROR in /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (232,41): ',' expected.) /Users/lsorensen/code/OneUnionV1/n

所以我在github上有一个项目,我试图升级到Angular 5。。一开始似乎很有效,但后来我发现了一些奇怪的bug,我想继续使用上次提交中的工作。。回到角度4。。但是,当我尝试构建项目时,我不断遇到以下错误:

ERROR in /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (232,41): ',' expected.)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (233,41): ',' expected.)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (1252,41): ',' expected.)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (1253,41): ',' expected.)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (1972,55): ',' expected.)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (1976,54): ',' expected.)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (1986,55): ',' expected.)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (1991,57): ',' expected.)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (2005,48): ',' expected.)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (2088,22): ',' expected.)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (232,94): Generic type 'IDirectiveFactory<TScope, IScope>' requires 2 type argument(s).)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (233,96): Generic type 'IDirectiveFactory<TScope, IScope>' requires 2 type argument(s).)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (1252,94): Generic type 'IDirectiveFactory<TScope, IScope>' requires 2 type argument(s).)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (1253,96): Generic type 'IDirectiveFactory<TScope, IScope>' requires 2 type argument(s).)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (1973,27): Generic type 'IDirective<TScope, IScope>' requires 2 type argument(s).)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (1973,48): Generic type 'IDirectiveLinkFn<TScope, IScope>' requires 2 type argument(s).)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (1987,15): Generic type 'IDirectiveLinkFn<TScope, IScope>' requires 2 type argument(s).)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (1988,16): Generic type 'IDirectiveLinkFn<TScope, IScope>' requires 2 type argument(s).)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (2002,19): Generic type 'IDirectiveLinkFn<TScope, IScope>' requires 2 type argument(s).)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (2002,46): Generic type 'IDirectivePrePost<TScope, IScope>' requires 2 type argument(s).)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (2006,19): Generic type 'IDirectiveCompileFn<TScope, IScope>' requires 2 type argument(s).)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (2015,16): Generic type 'IDirectiveLinkFn<TScope, IScope>' requires 2 type argument(s).)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (2015,43): Generic type 'IDirectivePrePost<TScope, IScope>' requires 2 type argument(s).)
    /Users/lsorensen/code/OneUnionV1/node_modules/@types/angular/index.d.ts (2088,24): Type parameter name cannot be 'any')
npm ERR! code ELIFECYCLE

该项目的其他开发人员已经确认,他们可以在同一个分支上运行构建,我很好。。。所以这一定是本地的问题。。我什么都试过了。删除它并重新控制。清理缓存。。删除并重新安装节点和所有全局软件包,甚至重新安装macOS。。。还是同样的错误。如果有人知道我可以尝试什么,我会非常感激

使用TypeScript 2.4.2和RxJS 5.4.2

使用TypeScript 2.4.2和RxJS 5.4.2

我也有同样的问题。我已经从项目文件夹(sudo npm uninstall-g typescript)全局卸载了typescript。然后用--save dev(sudo npm install--save dev typescript@'>=2.1.0在项目文件夹中安装了typescript。我也遇到了同样的问题。以下方法对我有效:我已从项目文件夹(sudo npm uninstall-g typescript)全局卸载了typescript。然后用--save dev在项目文件夹中安装了typescript(sudo npm安装--save dev typescript@'>=2.1.0您使用的是哪一版本的typescript?在我的软件包中是2.5.3。jsonit当时是2.2.1,正在工作,但我尝试升级以查看它是否能解决问题,没有luckAnd,这也是您的全局安装版本?无论如何,可能尝试升级到v2.4.2?我尝试过使用和不使用tsc全局package,但问题是它在我的另一个开发人员的机器上运行良好,而且他没有在全局安装typescript你在我的软件包中使用的typescript的哪个版本?2.5.3。jsonit当时在2.2.1上运行,但我试着升级看看它是否能解决问题,不,Luckan,这也是你的全局安装版本?无论如何,可能不会ry升级到v2.4.2?我尝试过使用和不使用tsc全局包,但问题是它在我的另一个开发人员的机器上运行良好,并且他没有在全局安装typescript
{
  "name": "TheOneUnion",
  "version": "1.0.0",
  "main": "index.js",
  "repository": {},
  "scripts": {
    "start": "npm run build && npm run server",
    "build": "webpack --progress --color",
    "build:aot": "webpack --env.aot --env.client & webpack --env.aot --env.server",
    "build:prod": "webpack --env.aot --env.client -p & webpack --env.aot --env.server",
    "prebuild": "npm run clean",
    "prebuild:aot": "npm run clean",
    "prebuild:prod": "npm run clean",
    "clean": "rimraf dist",
    "server": "nodemon dist/server.js",
    "watch": "webpack --watch",
    "watch:dev": "npm run server & npm run watch",
    "debug:server": "node-nightly --inspect --debug-brk dist/server.js & webpack --watch"
  },
  "engines": {
    "node": ">=6.0.0"
  },
  "license": "MIT",
  "dependencies": {
    "@agm/core": "1.0.0-beta.0",
    "@angular/animations": "4.4.3",
    "@angular/cdk": "2.0.0-beta.11",
    "@angular/common": "4.4.3",
    "@angular/core": "4.4.3",
    "@angular/forms": "4.4.3",
    "@angular/http": "4.4.3",
    "@angular/material": "2.0.0-beta.11",
    "@angular/platform-browser": "4.4.3",
    "@angular/platform-browser-dynamic": "4.4.3",
    "@angular/platform-server": "4.4.3",
    "@angular/router": "4.4.3",
    "@nguniversal/express-engine": "1.0.0-beta.2",
    "@types/mongodb": "2.2.0",
    "angular2-jwt": "0.2.0",
    "autoprefixer": "6.7.6",
    "aws-sdk": "2.23.0",
    "base64url": "2.0.0",
    "bcrypt-nodejs": "0.0.3",
    "bluebird": "3.5.0",
    "body-parser": "1.17.1",
    "bootstrap-sass": "3.3.7",
    "compression": "1.6.2",
    "crypto": "0.0.3",
    "css-loader": "0.25.0",
    "css-to-string-loader": "0.1.2",
    "debug": "2.6.8",
    "elasticsearch": "12.1.3",
    "evaporate": "2.0.9",
    "express": "4.15.2",
    "extract-text-webpack-plugin": "2.1.0",
    "global": "4.3.2",
    "gm": "1.23.0",
    "hammerjs": "2.0.8",
    "html-metadata": "^1.6.3",
    "imports-loader": "0.7.1",
    "js.clone": "0.0.3",
    "jsonwebtoken": "7.3.0",
    "lodash": "4.17.4",
    "log4js": "1.1.1",
    "methods": "1.1.2",
    "minilog": "3.1.0",
    "moment": "2.18.1",
    "mongoose": "4.11.4",
    "morgan": "1.8.1",
    "ng2-facebook-sdk": "2.3.1",
    "node-ffprobe": "1.2.2",
    "node-sass": "4.5.0",
    "nodemailer": "4.1.0",
    "normalize.css": "7.0.0",
    "postcss-loader": "1.3.3",
    "preboot": "4.5.2",
    "request": "2.80.0",
    "rxjs": "5.3.0",
    "sass-loader": "6.0.2",
    "webfontloader": "1.6.27",
    "xhr2": "0.1.4",
    "zone.js": "0.8.8"
  },
  "devDependencies": {
    "@angular/compiler": "4.4.3",
    "@angular/compiler-cli": "4.4.3",
    "@angular/core": "4.4.3",
    "@ngtools/webpack": "1.2.14",
    "@types/angular-material": "1.1.54",
    "@types/aws-sdk": "0.0.42",
    "@types/base64url": "2.0.3",
    "@types/bluebird": "3.5.3",
    "@types/body-parser": "0.0.34",
    "@types/compression": "0.0.33",
    "@types/cookie-parser": "1.3.30",
    "@types/elasticsearch": "5.0.12",
    "@types/evaporate": "0.0.18",
    "@types/express": "4.0.35",
    "@types/express-serve-static-core": "4.0.40",
    "@types/gm": "1.17.29",
    "@types/googlemaps": "^3.29.1",
    "@types/hammerjs": "2.0.34",
    "@types/jasmine": "2.5.43",
    "@types/jasminewd2": "2.0.1",
    "@types/jsonwebtoken": "7.2.0",
    "@types/lodash": "4.14.54",
    "@types/mime": "0.0.29",
    "@types/mongoose": "4.7.19",
    "@types/morgan": "1.7.32",
    "@types/node": "7.0.8",
    "@types/nodemailer": "1.3.32",
    "@types/request": "0.0.41",
    "@types/serve-static": "1.7.31",
    "@types/webfontloader": "1.6.28",
    "html-webpack-plugin": "2.28.0",
    "node-loader": "0.6.0",
    "nodemon": "1.11.0",
    "raw-loader": "0.5.1",
    "rimraf": "2.6.1",
    "script-ext-html-webpack-plugin": "1.7.1",
    "typescript": "2.5.3",
    "webpack": "3.5.5",
    "webpack-merge": "4.1.0",
    "webpack-node-externals": "1.6.0"
  }
}