Compile issue
vjamwec13579 opened this issue · 7 comments
I ran
npm install
npm start
CygWin on Windows
$ npm start
booknew@0.0.0 start C:\Users\james.weckbaugh\workspace\mailApp
ng serve
fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
** NG Live Development Server is running on http://localhost:4200. **
Hash: 4ee9ac68a612f37a0a7d
Time: 25357ms
chunk {0} main.bundle.js, main.bundle.map (main) 26.3 kB {2} [initial] [rendered]
chunk {1} styles.bundle.css, styles.bundle.map, styles.bundle.map (styles) 1.77 kB {3} [initial] [rendered]
chunk {2} vendor.bundle.js, vendor.bundle.map (vendor) 3.89 MB [initial] [rendered]
chunk {3} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry] [rendered]
ERROR in C:/Users/james.weckbaugh/workspace/mailApp/node_modules/@types/jasmine/index.d.ts (40,52): '=' expected.
ERROR in C:/Users/james.weckbaugh/workspace/mailApp/node_modules/@types/jasmine/index.d.ts (42,62): '=' expected.
ERROR in C:/Users/james.weckbaugh/workspace/mailApp/node_modules/@types/jasmine/index.d.ts (40,38): A parameter initializer is only allowed in a function or constructor implementation.
ERROR in C:/Users/james.weckbaugh/workspace/mailApp/node_modules/@types/jasmine/index.d.ts (40,46): Cannot find name 'keyof'.
ERROR in C:/Users/james.weckbaugh/workspace/mailApp/node_modules/@types/jasmine/index.d.ts (42,46): A parameter initializer is only allowed in a function or constructor implementation.
ERROR in C:/Users/james.weckbaugh/workspace/mailApp/node_modules/@types/jasmine/index.d.ts (42,56): Cannot find name 'keyof'.
ERROR in C:/Users/james.weckbaugh/workspace/mailApp/node_modules/@types/jasmine/index.d.ts (58,42): Cannot find name 'Partial'.
ERROR in C:/Users/james.weckbaugh/workspace/mailApp/node_modules/@types/jasmine/index.d.ts (99,22): Cannot find name 'Partial'.
ERROR in C:/Users/james.weckbaugh/workspace/mailApp/node_modules/@types/jasmine/index.d.ts (99,35): Cannot find name 'Partial'.
ERROR in C:/Users/james.weckbaugh/workspace/mailApp/node_modules/@types/jasmine/index.d.ts (314,15): All declarations of 'Matchers' must have identical type parameters.
webpack: Failed to compile.
I get similar errors.
ERROR in D:/javascript/router_mailapp/src/app/spec_utils.ts (4,3): Cannot find name 'jasmine'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (113,52): '=' exp
ected.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (121,62): '=' exp
ected.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (614,19): ']' exp
ected.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (614,20): ';' exp
ected.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (614,21): Declara
tion or statement expected.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (697,1): Declarat
ion or statement expected.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (551,13): Invalid
use of 'arguments'. Modules are automatically in strict mode.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (113,38): A param
eter initializer is only allowed in a function or constructor implementation.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (113,46): Cannot
find name 'keyof'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (121,46): A param
eter initializer is only allowed in a function or constructor implementation.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (121,56): Cannot
find name 'keyof'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (137,42): Cannot
find name 'Partial'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (182,22): Cannot
find name 'Partial'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (182,35): Cannot
find name 'Partial'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (614,7): A comput
ed property name must be of type 'string', 'number', 'symbol', or 'any'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (614,8): Cannot f
ind name 'k'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (614,13): Cannot
find name 'keyof'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (614,19): Cannot
find name 'T'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (614,23): Cannot
find name 'Spy'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (619,24): Cannot
find name 'Spy'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (621,32): Cannot
find name 'Spy'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (623,41): Cannot
find name 'Spy'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (625,33): Cannot
find name 'Spy'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (627,34): Cannot
find name 'Spy'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (629,17): Cannot
find name 'Spy'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (668,37): Cannot
find name 'Reporter'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (674,21): Cannot
find name 'RunDetails'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (678,19): Cannot
find name 'Suite'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (679,33): Cannot
find name 'SuiteOrSpec'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (688,15): Cannot
find name 'Spec'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (689,16): Cannot
find name 'Clock'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (693,30): Cannot
find name 'HtmlReporter'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (694,32): Cannot
find name 'HtmlSpecFilter'.
ERROR in D:/javascript/router_mailapp/node_modules/@types/jasmine/index.d.ts (702,26): Module
'"D:/javascript/router_mailapp/node_modules/@types/jasmine/index".jasmine' has no exported mem
ber 'Jasmine'.
webpack: Failed to compile.
Update typescript to >= 2.1.6
I'm seeing the same issues running TypeScript 2.4.1. Any other ideas here?
UPDATE
I manually had to upgrade jasmine
, @types/jasmine
and rxjs
to get this to run. In addition, I also had to update router_mailapp/src/typings.d.ts and add <T>
after the word Matchers
in the interface. I'm not sure if all of that is necessary for everyone, but that's what worked for me. Hopefully it helps others running into the same issues.
@aswath-veersoft @jbgarr Oh i also remember that I had to exclude the .spec files and all related test stuff for it to compile.
Here is the tsconfig.json i used:
{
"compilerOptions": {
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es6", "dom"],
"mapRoot": "./",
"module": "es6",
"moduleResolution": "node",
"outDir": "../dist/out-tsc",
"sourceMap": true,
"target": "es5",
"typeRoots": [
"../node_modules/@types"
]
},
"exclude": [
"node_modules/**",
"test.ts",
"spec_utils.ts",
"**/*.spec.ts"
]
}
I set the typescript
version to 2.1.6 in the package.json so you can try with that exact version as wel although I think greater versions should be okl. Also be sure to launch the app using the actual angular-cli
installed locally, not the one you might have installed globally.
node_modules/.bin/ng serve
.
Hope it help.
I made a couple of changes and is working,
you can see this repo with the changes
https://github.com/correasebastian/router_mailapp