我正在構建一個調度應用程序,它使用syncfusion調度程序組件(基本上是一個jQuery插件周圍的ng2包裝)。在他們的文檔之後,我添加了jquery和相關的TS類型,並且在npm版本的一些升級之後,一切工作都很好。由於jQuery的類型錯誤部署失敗的天青git
當git部署到Azure進行測試和演示時,我的構建失敗。最初的錯誤如下:
找不到模塊「驗證-NPM-包牌」
這是不是一個包我已經安裝,但我相信這是必要的證明我的公司擁有這些控件的許可證(我們這樣做)。我有一個開放的支持電話與syncfusion,但希望能夠進步,而不用等太久!不知道這是否是一個有效的修復,但增加的prepublish腳本:
"prepublish": "npm install -g validate-npm-package-license"
似乎已經解決了這個問題。然而,下一個構建失敗,沒有真正的理由給出,除了退出的過程。根據過去的經驗,偶爾蔚藍git的部署已經傳遞重新部署之前隨機失敗這樣的,所以我試過了,但現在收到成百上千的jQuery分型錯誤,如:
錯誤的[在裝載機] ./node_modules /@types/jquery/index.d.ts:41:40 TS1005:','預計。
ERROR in [at-loader] ./node_modules/@types/jquery/index.d.ts:4332:52 TS1139:預期的類型參數聲明。
ERROR in [at-loader] ./node_modules/@types/jquery/index.d.ts:35:23 TS2314:泛型類型'JQueryStatic'需要2個類型參數。
等等等等
我已經有了降級到更老的版本,這些分型的固定本地編譯錯誤,但我不確定這是爲什麼現在在蔚藍的失敗。
我被迫蔚藍的節點版本8.0.0與環境變量,而這隨後產生的5.0.0的NPM版本,這是我目前的package.json文件:
{
"name": "scheduler",
"version": "0.0.0",
"scripts": {
"prepublish": "npm install -g validate-npm-package-license",
"build": "webpack",
"copy-ej": "xcopy node_modules\\syncfusion-javascript\\Content\\ej wwwroot\\dist\\ej /y /s /i",
"postinstall": "npm run copy-ej",
"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/ej.web.all": "^15.2.3",
"@types/jquery": "^2.0.42",
"@types/node": "^6.0.42",
"angular2-jwt": "^0.2.3",
"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",
"ej-angular2": "^15.2.43",
"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",
"ngx-bootstrap": "^1.7.0",
"preboot": "^4.5.2",
"raw-loader": "^0.5.1",
"rxjs": "5.4.1",
"style-loader": "^0.13.1",
"syncfusion-javascript": "^15.2.43",
"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.8.12"
},
"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"
}
}
有什麼建議可能會導致這種情況? 乾杯
感謝您的建議,我已經升級到[email protected]和@ types/jquery @ 3.2.5,並且仍然有一噸','預計錯誤:( –