私はフロントエンドにangular2を持つasp.netコアアプリを持っています。私はdotnet new angular
でそれを作成しました。私のAsp.Net Core + Angularを紺色に公開できません
私は、サーバーに公開しようとすると、依存関係をインストールするに失敗するようだ:
npm install
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.10.2
npm ERR! npm v3.10.10
npm ERR! code ETARGET
npm ERR! notarget No compatible version found: @types/[email protected]
npm ERR! notarget Valid install targets:
npm ERR! notarget 2.0.41, 2.0.40, 2.0.39, 2.0.38, 2.0.37, 2.0.36, 2.0.35, 2.0.34, 2.0.33, 2.0.32, 1.10.31, 1.10.30, 1.10.29, 1.10.28, 1.10.27, 1.10.26-alpha, 1.10.25-alpha, 1.10.24-alpha, 1.10.23-alpha, 1.10.22-alpha, 1.10.21-alpha, 1.10.20-alpha, 1.10.15-alpha, 1.10.14-alpha, 1.10.8-alpha
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'AstroWeb'
npm ERR! notarget
しかし、それはローカルで正常に動作します。
マイpackage.json
:
{
"name": "AstroWeb",
"version": "0.0.0",
"scripts": {
"test": "karma start ClientApp/test/karma.conf.js"
},
"dependencies": {
"@angular/common": "^2.4.5",
"@angular/compiler": "^2.4.5",
"@angular/core": "^2.4.5",
"@angular/forms": "^2.4.5",
"@angular/http": "^2.4.5",
"@angular/platform-browser": "^2.4.5",
"@angular/platform-browser-dynamic": "^2.4.5",
"@angular/platform-server": "^2.4.5",
"@angular/router": "^3.4.5",
"@types/node": "^6.0.42",
"@types/jquery": "2.2.1" ,
"angular2-platform-node": "~2.0.11",
"angular2-template-loader": "^0.6.2",
"angular2-universal": "^2.1.0-rc.1",
"angular2-universal-patch": "^0.2.1",
"angular2-universal-polyfills": "^2.1.0-rc.1",
"aspnet-prerendering": "^2.0.0",
"aspnet-webpack": "^1.0.17",
"awesome-typescript-loader": "^3.0.0",
"bootstrap": "^3.3.7",
"css": "^2.2.1",
"css-loader": "^0.25.0",
"es6-shim": "^0.35.1",
"event-source-polyfill": "^0.0.7",
"expose-loader": "^0.7.1",
"extract-text-webpack-plugin": "^2.0.0-rc",
"file-loader": "^0.9.0",
"html-loader": "^0.4.4",
"isomorphic-fetch": "^2.2.1",
"jquery": "^2.2.1",
"json-loader": "^0.5.4",
"preboot": "^4.5.2",
"raw-loader": "^0.5.1",
"rxjs": "^5.0.1",
"style-loader": "^0.13.1",
"to-string-loader": "^1.1.5",
"typescript": "^2.2.1",
"url-loader": "^0.5.7",
"webpack": "^2.2.0",
"webpack-hot-middleware": "^2.12.2",
"webpack-merge": "^0.14.1",
"zone.js": "^0.7.6"
},
"devDependencies": {
"@types/chai": "^3.4.34",
"@types/jasmine": "^2.5.37",
"chai": "^3.5.0",
"jasmine-core": "^2.5.2",
"karma": "^1.3.0",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-webpack": "^1.8.0"
}
}
何間違っているだろうか?
npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.10.2
npm ERR! npm v3.10.10
npm ERR! code ETARGET
npm ERR! notarget No compatible version found: @types/[email protected]
npm ERR! notarget Valid install targets:
npm ERR! notarget 2.0.41, 2.0.40, 2.0.39, 2.0.38, 2.0.37, 2.0.36, 2.0.35, 2.0.34, 2.0.33, 2.0.32, 1.10.31, 1.10.30, 1.10.29, 1.10.28, 1.10.27, 1.10.26-alpha, 1.10.25-alpha, 1.10.24-alpha, 1.10.23-alpha, 1.10.22-alpha, 1.10.21-alpha, 1.10.20-alpha, 1.10.15-alpha, 1.10.14-alpha, 1.10.8-alpha
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'AstroWeb'
npm ERR! notarget
私はバージョン2.0.41を設定しようとしました:エイドリアン・ホールによって提案されたように、私はノードのバージョンを指定しようとしたが、それは問題を解決しない
EDIT
packages.jsonでは、私はもう同じ問題はありません。私のimport 'jquery'
のうちの1つだけが失敗しました。
私は問題
どのエンジンバージョンを指定する必要がありますか? – J4N
私は鉱山(> = 3.10.10)と同じものを指定しようとしましたが、私はまだ同じ問題があります。しかし、NPMはjqueryについて不平を言っているのですか? – J4N
また、私のバージョンは私が今投稿したパブリッシュスクリプトに表示されているバージョンなので、ローカルバージョンをリモートで使用する必要がありますか?私がローカルに持っていたバージョンにnpm +ノードのバージョンを設定しようとすると、私は離れていて、私は同じ問題を抱えています。 – J4N