You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
speeding up build on windows - Failed to parse file #2154
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see use [gitter](https://gitter.im/mgechev/angular2-seed) or [stackoverflow](https://stackoverflow.com/questions/tagged/angular2)
Current behavior
Running the below command as per instructions in speeding up build on windows wiki page tsc --project tsconfig.json
throws error: error TS5014: Failed to parse file 'tsconfig.json/tsconfig.json': Unexpected token u in JSON at position 0.
Expected behavior
compile tools to js files
Minimal reproduction of the problem with instructions tsc --project tsconfig.json
Please tell us about your environment:
OS: Windows 10
IDE: VSCode v1.17.2
NPM v4.0.2
node v 6.9.1
The reason I'm trying to speed up the build is my build time has gone up massively and I'm not sure why. It used to be a few seconds and now it is consistently 1.6 mins.
Latest compile:
[10:54:27] Starting 'build.dev'...
[10:54:27] Starting 'initialize'...
[10:54:27] Starting 'noop'...
[10:54:27] Finished 'noop' after 105 μs
[10:54:27] Finished 'initialize' after 901 μs
[10:54:27] Starting 'clean.once'...
[10:54:27] Skipping clean on rebuild
[10:54:27] Finished 'clean.once' after 198 μs
[10:54:27] Starting 'build.assets.dev'...
[10:54:27] Finished 'build.assets.dev' after 157 μs
[10:54:27] Starting 'build.fonts'...
[10:54:27] Finished 'build.fonts' after 18 ms
[10:54:27] Starting 'build.html_css'...
[10:54:28] Finished 'build.html_css' after 1.01 s
[10:54:28] Starting 'build.js.dev'...
[10:56:03] Finished 'build.js.dev' after 1.57 min
[10:56:03] Starting 'build.index.dev'...
[10:56:03] gulp-inject 3 files into index.html.
[10:56:03] gulp-inject 5 files into index.html.
[10:56:03] gulp-inject 6 files into index.html.
[10:56:03] Finished 'build.index.dev' after 68 ms
[10:56:03] Starting 'sw.manifest.static'...
[10:56:03] Finished 'sw.manifest.static' after 445 ms
[10:56:03] Finished 'build.dev' after 1.6 min
[BS] Reloading Browsers...
I once had the same suspicious "Failed to parse file..." error after having run tsc (without --project tsconfig.json if I remember correctly). The solution was to delete every .js and .js.map files generated by that tsc, and to always use the npm run build.dev/prod build commands instead of tsc in this seed. But beware, only delete .js files for which there exist corresponding .ts files, i.e. there are still some raw JS-only scripts in this seed.
Somehow the tsconfig.json in this seed interferes with the remaining build process.
Activity
JonCatmull commentedon Nov 28, 2017
The reason I'm trying to speed up the build is my build time has gone up massively and I'm not sure why. It used to be a few seconds and now it is consistently 1.6 mins.
Latest compile:
vyakymenko commentedon Feb 26, 2018
Hello @JonCatmull , please install TypeScript
npm install typescript -gand try again.vyakymenko commentedon Mar 2, 2018
@JonCatmull , still existing issue?
ComFreek commentedon Mar 3, 2018
I once had the same suspicious "Failed to parse file..." error after having run
tsc(without--project tsconfig.jsonif I remember correctly). The solution was to delete every.jsand.js.mapfiles generated by thattsc, and to always use thenpm run build.dev/prodbuild commands instead oftscin this seed. But beware, only delete.jsfiles for which there exist corresponding.tsfiles, i.e. there are still some raw JS-only scripts in this seed.Somehow the
tsconfig.jsonin this seed interferes with the remaining build process.JonCatmull commentedon Mar 5, 2018
Apologies I will test try these 2 commands today and let you know