I have come across several types of errors I can write in Meteor/Angular code that seem to break the compiler without throwing an error. Some examples:
export const foo = {
propA: 'abc',
propB: 123;
propc: 'value'
}
where the semicolon erroneously in the middle of the object breaks things badly. Another:
private _functionName( param1: string, param2: boolean; param3: string ): void { // do stuff here }
Where again the semicolon is erroneously placed. Third:
const propertyName = thisArray.map( thing => return thing._id );
where the callback function should be wrapped in braces (a semicolon might've helped there too). Fourth:
import style from './this.component.scss';
where the specified .scss file does not exist ( if it exists but is 0-byte that will pass - it's only the case that it doesn't exist that fails).
Each of these mistakes results in a clean compile on the server side, and an error-free client console with an application that hangs on the loading screen.
There is a question of if/how to reproduce; below are the specific environmental parameters I'm working under, on Amazon Linux.
"devDependencies": {
"@types/chai": "3.4.34",
"@types/meteor": "^1.3.31",
"@types/mocha": "2.2.34",
"chai": "3.5.0",
"chai-spies": "0.7.1"
},
"dependencies": {
"@angular/animations": "^4.1.3",
"@angular/common": "^4.1.3",
"@angular/compiler": "^4.1.3",
"@angular/core": "^4.1.3",
"@angular/forms": "^4.1.3",
"@angular/http": "^4.1.3",
"@angular/material": "^2.0.0-beta.5",
"@angular/platform-browser": "^4.1.3",
"@angular/platform-browser-dynamic": "^4.1.3",
"@angular/router": "^4.1.3",
"@mahpah/angular-cropper": "0.0.1",
"@ngx-translate/core": "^6.0.1",
"@types/htmlparser2": "^3.7.29",
"angular-draggable-droppable": "^1.0.1",
"angular2-meteor": "^0.7.1",
"angular2-meteor-accounts-ui": "^1.0.0",
"angular2-meteor-polyfills": "^0.1.1",
"angular2-meteor-tests-polyfills": "0.0.2",
"babel-runtime": "^6.23.0",
"hammerjs": "^2.0.8",
"htmlparser2": "^3.9.2",
"meteor-node-stubs": "^0.2.11",
"meteor-rxjs": "^0.4.7",
"ng-gallery": "^0.7.1",
"ngx-pagination": "^3.0.0",
"reflect-metadata": "^0.1.10",
"rxjs": "^5.2.0",
"simpl-schema": "^0.2.3",
"zone.js": "^0.8.11"
}
[email protected] # Packages every Meteor app needs to have
[email protected] # Packages for a great mobile UX
[email protected] # The database Meteor supports right now
[email protected] # Reactive variable for tracker
[email protected] # Meteor's client-side reactive programming library
[email protected] # CSS minifier run for production mode
[email protected] # JS minifier run for production mode
[email protected] # ECMAScript 5 compatibility for older browsers.
angular2-compilers
practicalmeteor:mocha
xolvio:cleaner
hwillson:stub-collections
dispatch:mocha-phantomjs
[email protected]
aldeed:collection2-core
aldeed:schema-deny
aldeed:schema-index
mdg:validated-method
mdg:validation-error
[email protected]
alanning:roles
tmeasday:publish-counts
dburles:collection-helpers
matb33:collection-hooks
[email protected]
edgee:slingshot
[email protected]
[email protected]
{
"compilerOptions": {
"target": "es5",
"lib": [
"es6",
"dom"
],
"module": "commonjs",
"moduleResolution": "node",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"sourceMap": true
},
"exclude": [
"node_modules"
],
"compileOnSave": false,
"angularCompilerOptions": {
"genDir": "aot",
"skipMetadataEmit": true
}
}
My question, then, is this:
Is there a linter, or some debugger log that I am not seeing that would aid in troubleshooting? I recognize that some IDE's would highlight these errors (especially the missing SCSS file) but that doesn't answer my question.
Thanks in advance!