从一位已经走了的同事那里继承了一个破碎的NLog项目...
我的npm节点总是说'npm - not installed'
当我右键单击时,我立即获得“路径中的非法字符”
这是我的package.json
{
"version": "0.0.0",
"name": "asp.net",
"devDependencies": {
"gulp": "^3.9.0",
"gulp-bower": "^0.0.11",
"gulp-concat": "^2.6.0",
"gulp-install": "^0.6.0",
"gulp-sass": "^2.1.1",
"gulp-uglify": "^1.5.1",
"gulp-util": "^3.0.7",
"gulp-watch": "^4.3.5",
"run-sequence": "^1.1.5",
"browser-sync": "^2.10.0",
"gulp-filter": "^3.0.1",
"main-bower-files": "^2.9.0",
"gulp-rename": "^1.2.2",
"gulp-sourcemaps": "^1.6.0"
}
这是我的project.json:
{
"webroot": "wwwroot",
"version": "1.0.0-*",
"dependencies": {
"EntityFramework.Commands": "7.0.0-rc1-final",
"EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
"Microsoft.AspNet.Authentication.Cookies": "1.0.0-rc1-final",
"Microsoft.AspNet.Diagnostics": "1.0.0-rc1-final",
"Microsoft.AspNet.Diagnostics.Entity": "7.0.0-rc1-final",
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc1-final",
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
"Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.Server.WebListener": "1.0.0-rc1-final",
"Microsoft.AspNet.Session": "1.0.0-rc1-final",
"Microsoft.AspNet.SignalR.Server": "3.0.0-rc1-final",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
"Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-final",
"Microsoft.Extensions.Caching.Memory": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.NLog": "1.0.0-rc1-final",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc1-final",
"MvcWebApiCors": "0.3.0"
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel",
"ef": "EntityFramework.Commands"
},
"frameworks": {
"dnx451": {
"dependencies": {
"Rally.RestApi": "1.0.0-*"
}
}
},
"exclude": [
"wwwroot",
"node_modules",
"bower_components"
],
"publishExclude": [
"node_modules",
"bower_components",
"**.kproj",
"**.user",
"**.vspscc"
],
"scripts": {
"postrestore": [ "npm install" ],
"prepare": [ "gulp" ]
}
这是我的Bower.json
{
"name": "WebApplication",
"private": true,
"dependencies": {
"bootstrap": "^4.0.0-alpha.2",
"signalr": "^2.2.0",
"font-awesome": "^4.5.0",
"moment": "^2.11.0",
"Chart-js": "^1.0.2",
"tether": "^1.1.1",
"bootstrap-daterangepicker": "2.1.17",
"handlebars": "^4.0.5",
"chosen": "^1.4.2"
}
global.json
{
"projects": [
"src",
"wrap"
],
"sdk": {
"version": "1.0.0-rc1-update1"
}
整体问题是没有任何css /样式显示。与我们的iis盒子相比,该网站看起来很像骨架。
答案 0 :(得分:3)
某些软件包(例如webpack)依赖于窗口不支持的软件包,导致NPM打印有关它的警告。 VS将其解释为通用问题,并表示即使实际上应该忽略此警告,也不会安装软件包。