Skip to content

Add possibility to move tsconfig.json (angular-cli.json) #862

Closed

Description

@serhiisol

So basically I have problems with editor like VSCode.
It expects to have tsconfig.json at the project root directory.
And it seems like CLI skips angular-cli.json tsconfig option
When I did that I've got next problem:

  1. Mac OSX El Capitan

  2. angular-cli: 1.0.0-beta.4
    node: 5.7.1
    os: darwin x64
    3.

    1. Move tsconfig.json to the project root directory
    2. change angular-cli.json file
    3. change configuration of tsconfig.json
The Broccoli Plugin: [BroccoliTypeScriptCompiler] failed with:
Error: ENOENT: no such file or directory, open '/Users/serhiysolonko/Development/Projects/WebApp/tmp/broccoli_type_script_compiler-input_base_path-jNRnmJYp.tmp/0/src/tsconfig.json'
    at Error (native)
    at Object.fs.openSync (fs.js:584:18)
    at Object.fs.readFileSync (fs.js:431:33)
    at BroccoliTypeScriptCompiler._loadTsConfig (/Users/serhiysolonko/Development/Projects/WebApp/node_modules/angular-cli/lib/broccoli/broccoli-typescript.js:123:34)
    at BroccoliTypeScriptCompiler._createServiceHost (/Users/serhiysolonko/Development/Projects/WebApp/node_modules/angular-cli/lib/broccoli/broccoli-typescript.js:158:25)
    at BroccoliTypeScriptCompiler.build (/Users/serhiysolonko/Development/Projects/WebApp/node_modules/angular-cli/lib/broccoli/broccoli-typescript.js:41:12)
    at /Users/serhiysolonko/Development/Projects/WebApp/node_modules/angular-cli/node_modules/broccoli-caching-writer/index.js:152:21
    at lib$rsvp$$internal$$tryCatch (/Users/serhiysolonko/Development/Projects/WebApp/node_modules/angular-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1036:16)
    at lib$rsvp$$internal$$invokeCallback (/Users/serhiysolonko/Development/Projects/WebApp/node_modules/angular-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1048:17)
    at lib$rsvp$$internal$$publish (/Users/serhiysolonko/Development/Projects/WebApp/node_modules/angular-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1019:11)
    at lib$rsvp$asap$$flush (/Users/serhiysolonko/Development/Projects/WebApp/node_modules/angular-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1198:9)
    at _combinedTickCallback (node.js:370:9)
    at process._tickCallback (node.js:401:11)

screen shot 2016-05-20 at 12 57 45 pm

Activity

  1. filipesilva commented on Jun 2, 2016

    @filipesilva
    Contributor

    Do you still have this? I'm running VSCode on CLI projects and it seems to be fine. I'll reopen if it still happens to you.

  2. serhiisol commented on Jun 6, 2016

    @serhiisol
    ContributorAuthor

    @filipesilva moving tsconfig.json seems not working for me.

    1. I pulled code, master branch
    2. made sudo npm link from repository folder
    3. npm link angular-cli from project folder.
    4. changed angular-cli.json apps[].tsconfig option
    5. ran ng serve

    Stack trace is the same.

    Should I do something specific ?

    PS. I don't see problem in VSCode anymore, they fixed tsserver issue, but still having issue with moving tsconfig.json

  3. filipesilva commented on Jun 7, 2016

    @filipesilva
    Contributor

    Right you are, the location of tsconfig.json in angular-cli.json isn't being used in the build system: https://github.com/angular/angular-cli/blob/master/lib/broccoli/angular2-app.js#L320

  4. added
    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
    on Jun 7, 2016
  5. BANG88 commented on Jul 5, 2016

    @BANG88

    Any updates ?

  6. samirthebti commented on Jul 6, 2016

    @samirthebti

    Any help ? !!

  7. serhiisol commented on Jul 7, 2016

    @serhiisol
    ContributorAuthor

    @filipesilva but how can we add this possibility?

  8. added
    P5The team acknowledges the request but does not plan to address it, it remains open for discussion
    and removed
    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
    on Jul 27, 2016
  9. filipesilva commented on Jul 27, 2016

    @filipesilva
    Contributor

    I don't think we'll be implementing this option as presented any time soon. Moving the tsconfig has serious implications in project compilation and it really should be at the root of the app.

    It's perfectly valid to have a tsconfig at any depth of a project as well, and a project can have several tsconfig files. That makes me think that the problem might be related to the editor rather than the project.

    There might also be other editor issues that manifest the way you are showing, for instance microsoft/vscode#9232 (I suffer from this one myself).

  10. angular-automatic-lock-bot commented on Sep 5, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  11. locked and limited conversation to collaborators on Sep 5, 2019
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

    P5The team acknowledges the request but does not plan to address it, it remains open for discussion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions