Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Comments

@serhiisol
Copy link
Contributor

serhiisol commented May 20, 2016

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

@filipesilva
Copy link
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.

@serhiisol
Copy link
Contributor Author

serhiisol commented Jun 6, 2016

@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

@filipesilva filipesilva reopened this Jun 7, 2016
@filipesilva
Copy link
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

@filipesilva filipesilva added type: bug/fix command: build P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent labels Jun 7, 2016
@BANG88
Copy link

BANG88 commented Jul 5, 2016

Any updates ?

@samirthebti
Copy link

Any help ? !!

@serhiisol
Copy link
Contributor Author

serhiisol commented Jul 7, 2016

@filipesilva but how can we add this possibility?

@filipesilva filipesilva added P5 The team acknowledges the request but does not plan to address it, it remains open for discussion and removed type: bug/fix P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent labels Jul 27, 2016
@filipesilva
Copy link
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).

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.