2017-05-23 4 views
1

전 프런트 엔드 개발에 익숙하지 않고 실행할 수없는 기존 프로젝트가 있습니다.Gulp 프로젝트를 실행할 수 없습니다

문서는 내가 실행해야 프로젝트를 실행하려면 말한다 : 그러나

$ gulp && gulp serve 

을, 나는 다음과 같은 오류가 나타납니다

/home/alex/some/project/node_modules/@types/gulp/index.d.ts(15,15): error TS2430: Interface 'Gulp' incorrectly extends interface 'Orchestrator'. 
    Types of property 'task' are incompatible. 
    Type 'AddMethod' is not assignable to type '{ (name: string): Task; (name: string, fn: TaskFunc): void; (name: string, dep: string[], fn: Tas...'. 
     Type 'Orchestrator' is not assignable to type 'Task'. 
     Property 'fn' is missing in type 'Orchestrator'. 

나는 무엇을 그리워 않았다을?

는 업데이트 : 여기

가 여기 내 package.json

{ 
    "name": "test", 
    "version": "0.0.1", 
    "description": "Some | description", 
    "author": "Author name", 
    "homepage": "http://sample.org", 
    "private": true, 
    "devDependencies": { 
    "@types/angular": "^1.5.5-alpha", 
    "@types/gulp": "^3.8.32", 
    "@types/node": "^6.0.52", 
    "autoprefixer": "^6.5.2", 
    "browser-sync": "^2.18.5", 
    "chai": "^3.5.0", 
    "chai-as-promised": "^5.3.0", 
    "del": "^2.2.2", 
    "eslint": "^3.9.1", 
    "eslint-config-angular": "^0.5.0", 
    "eslint-plugin-angular": "^1.4.1", 
    "gulp": "^3.9.1", 
    "gulp-angular-filesort": "^1.1.1", 
    "gulp-angular-templatecache": "^2.0.0", 
    "gulp-autoprefixer": "^3.1.1", 
    "gulp-clean": "^0.3.2", 
    "gulp-concat": "^2.6.1", 
    "gulp-cssmin": "^0.1.7", 
    "gulp-eslint": "^3.0.1", 
    "gulp-htmlmin": "^3.0.0", 
    "gulp-if": "^2.0.2", 
    "gulp-imagemin": "^3.1.1", 
    "gulp-inject": "^4.1.0", 
    "gulp-jade": "^1.1.0", 
    "gulp-jscs": "^4.0.0", 
    "gulp-jsdoc3": "^1.0.1", 
    "gulp-load-plugins": "^1.4.0", 
    "gulp-print": "^2.0.1", 
    "gulp-replace": "^0.5.4", 
    "gulp-rev": "^7.1.2", 
    "gulp-sass": "^3.0.0", 
    "gulp-sourcemaps": "^2.4.1", 
    "gulp-stylelint": "^3.9.0", 
    "gulp-tslint": "^7.0.1", 
    "gulp-typescript": "^3.1.3", 
    "gulp-uglify": "^2.0.0", 
    "gulp-util": "^3.0.8", 
    "husky": "^0.13.1", 
    "jasmine": "^2.5.2", 
    "jshint": "^2.9.4", 
    "karma": "^1.3.0", 
    "karma-angular": "^0.0.6", 
    "karma-chai": "^0.1.0", 
    "karma-chai-as-promised": "^0.1.2", 
    "karma-mocha": "^1.3.0", 
    "karma-phantomjs-launcher": "^1.0.2", 
    "karma-requirejs": "^1.1.0", 
    "merge-stream": "^1.0.1", 
    "mocha": "^3.1.2", 
    "path-exists": "^3.0.0", 
    "phantomjs-prebuilt": "^2.1.13", 
    "requirejs": "^2.2.0", 
    "run-sequence": "^1.2.2", 
    "rxjs": "^5.0.1", 
    "serve-static": "^1.11.1", 
    "simple-git": "^1.65.0", 
    "stream-series": "^0.1.1", 
    "tslint": "^4.3.1", 
    "typescript": "^2.1.4", 
    "wiredep": "^4.0.0", 
    "yargs": "^6.5.0" 
    }, 
    "engines": { 
    "node": ">=0.10.0" 
    }, 
    "scripts": { 
    "postinstall": "bower install", 
    "start": "npm install", 
    "js-doc": "rm -rf ./docs && gulp js-doc && open docs/gen/global.html", 
    "precommit": "node enforceLinter.js" 
    } 
} 

입니다 내 gulpfile.js

gulp.task("serve", ["copymapdata", "imagemin", "copyfonts", "copyskins", "copyother", "inject"],() => { 
    browserSync.init({ 
     open: true, 
     port: 8000, 
     reloadDelay: 3000, 
     server: { 
      baseDir: ".tmp", 
      routes: { 
       "/bower_components": "./app/bower_components" 
      }, 
      cors: true, 
      middleware: function(req, res, next) { 
       res.setHeader("Access-Control-Allow-Origin", "*"); 
       res.setHeader("Access-Control-Allow-Headers", "*"); 
       next(); 
      } 
     } 
    }); 
    gulp.watch(config.allcss, ["styles"]); 
    gulp.watch(config.alljs, ["js-watch"]); 
    gulp.watch(config.alljade, ["jade-watch"]); 
    gulp.watch(config.allts, ["ts-watch"]); 
}); 
+0

엉망인'Orchestrator' 타이핑처럼 보입니다. 'package.json'과'gulpfile'의 부분을 추가 할 수 있습니까 – Dinistro

+1

@Dinistro, 제 질문을 업데이트했습니다. 충분한가? –

답변

2

업데이트에서 "유형/꿀꺽 @"최신 버전으로 꿀꺽 serve 작업입니다 : "^ 4.0.3"

+0

감사합니다. 그러나 캐럿 (^) 기호를 제거해도 영향은 없습니다. –

+0

꿀꺽 마당을 최신 버전 "@ types/gulp"로 업데이트하십시오. "^ 4.0.3" –

+0

이번에는 정말 옳습니다! 제발, 당신의 대답을 업데이 트하십시오. 감사! –

관련 문제