使用vs 2017使用.net核心发布角度材质项目时出错

问题描述 投票:1回答:1

当我在本地IIS中测试时,工作正常。但是在发布具有角度材质成分的角度项目时出现以下错误。

node_modules/@angular/material/progress-spinner/typings/index.d.ts.MatProgressSpinner_Host.html(2,1):类型'typeof'上不存在属性'DOCUMENT'C:/Users/suresh.poudel/Desktop / FreshStart28th / SSO / SSOApp / node_modules / @ angular / common / com ...'。node_modules/@angular/material/progress-spinner/typings/index.d.ts.MatSpinner_Host.html(2,1):Property'文档'不存在于..... \ app.csproj命令“node node_modules / webpack / bin / webpack.js --env.prod”退出,代码为2。

"devDependencies": {
    "@angular/animations": "~4.4.4",
    "@angular/cli": "^1.5.4",
    "@angular/common": "~4.4.4",
    "@angular/compiler": "~4.4.4",
    "@angular/core": "~4.4.4",
    "@angular/forms": "~4.4.4",
    "@angular/http": "~4.4.4",
    "@angular/platform-browser": "~4.4.4",
    "@angular/platform-browser-dynamic": "4.2.5",
    "@angular/platform-server": "4.2.5",
    "@angular/router": "4.2.5",
    "@ngtools/webpack": "1.5.0",
    "@types/chai": "4.0.1",
    "@types/jasmine": "2.5.53",
    "@types/webpack-env": "1.13.0",
    "angular2-router-loader": "0.3.5",
    "angular2-template-loader": "0.6.2",
    "aspnet-prerendering": "^3.0.1",
    "aspnet-webpack": "^2.0.1",
    "awesome-typescript-loader": "3.2.1",
    "bootstrap": "3.3.7",
    "chai": "4.0.2",
    "core-js": "^2.4.1",
    "css": "2.2.1",
    "css-loader": "0.28.4",
    "es6-shim": "0.35.3",
    "event-source-polyfill": "0.0.9",
    "expose-loader": "0.7.3",
    "extract-text-webpack-plugin": "2.1.2",
    "file-loader": "0.11.2",
    "html-loader": "0.4.5",
    "isomorphic-fetch": "2.2.1",
    "jasmine-core": "2.6.4",
    "jquery": "3.2.1",
    "json-loader": "0.5.4",
    "karma": "1.7.0",
    "karma-chai": "0.1.0",
    "karma-chrome-launcher": "2.2.0",
    "karma-cli": "1.0.1",
    "karma-jasmine": "1.1.0",
    "karma-webpack": "2.0.3",
    "preboot": "4.5.2",
    "raw-loader": "0.5.1",
    "reflect-metadata": "0.1.10",
    "rxjs": "^5.0.1",
    "style-loader": "0.18.2",
    "systemjs": "0.19.43",
    "to-string-loader": "1.1.5",
    "tsickle": "^0.23.5",
    "tslib": "^1.7.1",
    "typescript": "2.3.4",
    "url-loader": "0.5.9",
    "webpack": "2.5.1",
    "webpack-hot-middleware": "2.18.2",
    "webpack-merge": "4.1.0",
    "zone.js": "^0.8.12"
  },
  "dependencies": {
    "@angular/cdk": "^2.0.0-beta.12",
    "@angular/material": "2.0.0-beta.12"
  }
}
angular webpack angular-material publish
1个回答
1
投票

您是否尝试在控制台上运行失败的命令?

C:\ MySolutionPath> node node_modules / webpack / bin / webpack.js --env.prod

当我这样做时,它实际上在我的打字稿和模板中吐出了一系列错误。我在项目中发现的问题是我的模板无法访问我的私有属性。例如:

ERROR in quiz.component.html: Property 'auth' is private and only accessible within class 'QuizComponent'.
ERROR in quiz.component.html: Property 'auth' is private and only accessible within class 'QuizComponent'.

参考:https://www.ryadel.com/en/the-command-node-node_modules-webpack-bin-webpack-js-env-prod-exited-with-code-2-error-fix-angular-node/

© www.soinside.com 2019 - 2024. All rights reserved.