Skip to content

speeding up build on windows - Failed to parse file #2154

Open

Description

@JonCatmull

Thanks in advance for any help.

I'm submitting a ... (check one with "x")

[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

  • Angular Seed Version: 234a5fed2bc74ec6dceb32b6ddf09dcc504b4083

  • Node: node --version = 6.9.1

Activity

  1. JonCatmull commented on Nov 28, 2017

    @JonCatmull
    Author

    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...
    
  2. vyakymenko commented on Feb 26, 2018

    @vyakymenko
    Contributor

    Hello @JonCatmull , please install TypeScript npm install typescript -g and try again.

  3. vyakymenko commented on Mar 2, 2018

    @vyakymenko
    Contributor

    @JonCatmull , still existing issue?

  4. ComFreek commented on Mar 3, 2018

    @ComFreek

    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.

  5. JonCatmull commented on Mar 5, 2018

    @JonCatmull
    Author

    Apologies I will test try these 2 commands today and let you know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions