2017-04-20 7 views
0

私はフロントエンドに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つだけが失敗しました。

私は問題

答えて

0

あなたのNode.jsのバージョン(および可能性を解決してきたし、今のようである(4.5.0まで)リモートNPMのバージョンをアップグレードするために思われるnpm install -g npmhttps://my-site.scm.azurewebsites.net/DebugConsole上で)実行することも、管理npmバージョン)は、Azure App Serviceで使用されるデフォルトバージョンとは異なる可能性があります。 package.jsonの "engines"セクションを使用して、nodeとnpmに正しいバージョンを指定します。私のブログの記事を参照してください:https://shellmonger.com/2015/08/29/continuous-deployment-nodejs-and-microsoft-azure/

+0

どのエンジンバージョンを指定する必要がありますか? – J4N

+0

私は鉱山(> = 3.10.10)と同じものを指定しようとしましたが、私はまだ同じ問題があります。しかし、NPMはjqueryについて不平を言っているのですか? – J4N

+0

また、私のバージョンは私が今投稿したパブリッシュスクリプトに表示されているバージョンなので、ローカルバージョンをリモートで使用する必要がありますか?私がローカルに持っていたバージョンにnpm +ノードのバージョンを設定しようとすると、私は離れていて、私は同じ問題を抱えています。 – J4N

0

このポストを確認してください - Angular 2 web app in Azure returning system is not defined errorあなたのアプリにノードバージョンを追加してください。

+0

あなたはどんな投稿を参照していますか?あなたの質問をチェックしましたが、何も見つかりませんでした。また、これはjqueryの問題ではありませんか? – J4N

+0

http://stackoverflow.com/questions/42982340/angular-2-web-app-in-azure-returning-system-is-not-defined-error?noredirect=1#comment73136039_42982340あなたはこれをチェックし、ノードのバージョンを追加することができます – Born2Code

+0

こんにちはJ4N、それはあなたの問題を解決しましたか? – Born2Code

関連する問題