Friday, 17 March 2017

Accidentally hitt CMD+B in Sublime Text 3 and it broke my project

I'm having a hard time figuring this one out, I have a node.js project with a angular front-end, that I version on Git.

Sometime yesterday I accidentally hit cmd+B in Sublime Text not knowing what that command was, and ever since I'm having a bunch of problems building the project with npm run build.

The output from the build process now is

`ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/assets/app/auth/signin.component.ts:23:40

Property 'token' does not exist on type '{}'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/assets/app/auth/signin.component.ts:24:41

Property 'userId' does not exist on type '{}'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/assets/app/auth/signup.component.ts:75:40

Property 'token' does not exist on type '{}'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/assets/app/auth/signup.component.ts:76:41

Property 'userId' does not exist on type '{}'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/assets/app/questions/question-create.component.ts:141:50

Property 'obj' does not exist on type '{}'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/assets/app/user/settings/user.change-pass.component.ts:45:36

Property 'message' does not exist on type '{}'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/assets/app/user/settings/user.setting.component.ts:88:36

Property 'message' does not exist on type '{}'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/common/src/pipes/async_pipe.d.ts:44:37

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/compiler/src/directive_normalizer.d.ts:19:99

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/compiler/src/directive_normalizer.d.ts:21:73

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/compiler/src/offline_compiler.d.ts:31:123

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/compiler/src/resource_loader.d.ts:13:22

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/compiler/src/runtime_compiler.d.ts:40:48

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/compiler/src/runtime_compiler.d.ts:42:64

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/compiler/src/util.d.ts:35:17

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/compiler/src/util.d.ts:36:45

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/core/src/application_init.d.ts:16:17

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/core/src/application_ref.d.ts:106:66

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/core/src/application_ref.d.ts:122:100 
Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/core/src/application_ref.d.ts:148:66

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/core/src/application_ref.d.ts:150:100 
Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/core/src/facade/lang.d.ts:12:16

Cannot find name 'Map'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/core/src/facade/lang.d.ts:13:16

Cannot find name 'Set'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/core/src/linker/compiler.d.ts:53:48

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/core/src/linker/compiler.d.ts:61:64

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/core/src/linker/ng_module_factory_loader.d.ts:14:33

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/core/src/linker/system_js_ng_module_factory_loader.d.ts:28:24

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/core/src/util/lang.d.ts:8:52

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/platform-browser-dynamic/src/resource_loader/resource_loader_impl.d.ts:10:22

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/router/src/config.d.ts:279:61

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/router/src/interfaces.d.ts:78:98

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/router/src/interfaces.d.ts:157:108

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/router/src/interfaces.d.ts:227:114

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/router/src/interfaces.d.ts:297:90

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/router/src/interfaces.d.ts:367:49

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/router/src/router.d.ts:386:69

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/router/src/router.d.ts:408:58

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@angular/router/src/utils/collection.d.ts:35:57

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:47:35

Cannot find name 'Iterable'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:350:47

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:351:51

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:352:33

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:353:33

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:354:33

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:355:60

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:356:59

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:357:64

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:357:96

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:358:59

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:359:57

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:360:58

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:361:57

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:362:60

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:362:116

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:363:41

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:365:80

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:366:77

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:367:75

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:368:72

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:431:5

Cannot find name 'Symbol'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:456:38

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:464:58

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:465:58

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:467:47

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:468:68

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:472:39

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:474:47

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:494:54

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:495:44

Cannot find name 'PropertyKey'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:511:45

Cannot find name 'Iterable'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:512:42

Cannot find name 'Iterable'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:627:17

Cannot find name 'PromiseConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:642:31

Cannot find name 'Iterable'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:646:38

Cannot find name 'Iterable'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:646:52

Cannot find name 'Iterator'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:657:34

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:1280:33

Property 'for' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:1284:40

Property 'hasInstance' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:1288:47

Property 'isConcatSpreadable' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:1292:37

Property 'iterator' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:1296:35

Property 'keyFor' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:1300:34

Property 'match' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:1304:36

Property 'replace' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:1308:35

Property 'search' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:1312:36

Property 'species' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:1316:34

Property 'split' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:1320:40

Property 'toPrimitive' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:1324:40

Property 'toStringTag' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:1328:40

Property 'unscopables' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:2059:33

Property 'for' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:2063:40

Property 'hasInstance' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:2067:47

Property 'isConcatSpreadable' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:2071:37

Property 'iterator' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:2075:35

Property 'keyFor' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:2079:34

Property 'match' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:2083:36

Property 'replace' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:2087:35

Property 'search' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:2091:36

Property 'species' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:2095:34

Property 'split' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:2099:40

Property 'toPrimitive' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:2103:40

Property 'toStringTag' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/@types/core-js/index.d.ts:2107:40

Property 'unscopables' does not exist on type 'SymbolConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/ng2-uploader/src/directives/ng-file-drop.ts:81:25

Property 'from' does not exist on type 'ArrayConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/ng2-uploader/src/directives/ng-file-drop.ts:120:23

Property 'from' does not exist on type 'ArrayConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/ng2-uploader/src/directives/ng-file-select.ts:94:23

Property 'from' does not exist on type 'ArrayConstructor'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/rxjs/Observable.d.ts:10:65

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/rxjs/Observable.d.ts:66:59

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/rxjs/Observable.d.ts:66:69

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/rxjs/observable/PromiseObservable.d.ts:40:30

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/rxjs/observable/PromiseObservable.d.ts:41:25

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/rxjs/operator/toPromise.d.ts:7:58

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/rxjs/operator/toPromise.d.ts:7:68

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/rxjs/operator/toPromise.d.ts:9:8

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/rxjs/operator/toPromise.d.ts:10:25

Cannot find name 'Promise'.

ERROR in [default] /Users/user_dev/Documents/company/github/company_project_x/node_modules/rxjs/operator/toPromise.d.ts:10:35

Cannot find name 'Promise'.

`

I have tried reverting to the last known commit, downloading the project and creating a new folder in it to initialise and compile (from previous commits that should work) but I always end up with these errors.

I also noticed that the Sublime Build command filled my folders with .js files, that were redundant as my project uses .ts files. So I've removed them in hopes of clearing things up but still no luck.

Does anyone have a macic trick for me? :)



via lundzern

No comments:

Post a Comment