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
ng update @angular/cli with allowOutsideOutDir not working - Path is Invalid #10647
I recommend someting in the changelog, the upgrade guide, and a mlog message in the console when running the update command ... thise wil help folks know whats up
i do not see any reference to it in the changelog. but i see this issue #9363
changed the title [-]ng update @angular/cli not working - Path is Invalid[/-][+]ng update @angular/cli with `allowOutsideOutDir ` not working - Path is Invalid[/+]on May 4, 2018
Since allowOutsideOutDir has been removed, what all options do i have? @johnpapa i followed your guide to setup my project and my server is in src/server directory and it gets packaged in dist/ directory and my client app gets packaged in dist/public directory.
How can i migrate to Angular CLI 6.0.0 in this case when allowOutsideOutDir has been removed? As per this comment (#9363 (comment)), it seems that outside directories are working without this option now
Edit 1: The 'Path "/../" is invalid' error is not helpful at all. I am trying to migrate my 5.2.* project to 6.0.0 and i get this error while running the following command, it should at least give the file name and line number with the problem.
PS D:\Work\git_repos\ccw\client-app> ng update @angular/cli
Updating karma configuration
Updating configuration
Path "/../" is invalid.
Edit 2: I was able to resolve the 'Path "/../" is invalid error but not able to solve the main issue with it. I followed @johnpapa 's article and had the following in my .angular-cli.json:
The error comes because of this line: "output": "../". If i make it "output": "./", it works. Now, with allowOutsideOutDir support removed, i am not sure how i can deploy my client to dist/public and server to dist/
Edit 3: I used a workaround to make it work for now:
Specified "output" as "output": "./../" instead of "output": "../" as the code in common.js checks for strings beginning with "../". I really hope there is an option of making it work otherwise i will have to mix the server and client code in the same directory in the dist folder.
Activity
johnpapa commentedon May 4, 2018
it seems
allowOutsideOutDirhas been removed.I recommend someting in the changelog, the upgrade guide, and a mlog message in the console when running the
updatecommand ... thise wil help folks know whats upi do not see any reference to it in the changelog. but i see this issue #9363
Any guidance is appreciated.
filipesilva commentedon May 4, 2018
I think we should both show a warning on the release notes, and also show a warning during
ng updateabout those assets entries.filipesilva commentedon May 4, 2018
@devarg I don't think your comment is related to the issue shown here by @johnpapa. Can you instead open a new issue? Thanks!
filipesilva commentedon May 4, 2018
Added a
Breaking Changessection to https://github.com/angular/angular-cli/releases/tag/v6.0.0, with this change listed.devarg commentedon May 4, 2018
@filipesilva I'm sorry you are right, build the issue has been moved to to issue 10649
[-]ng update @angular/cli not working - Path is Invalid[/-][+]ng update @angular/cli with `allowOutsideOutDir ` not working - Path is Invalid[/+]elvisbegovic commentedon May 4, 2018
@johnpapa can you please search before open issue #10350
It is not first time you open this one #8122
While this already exist #7773
Thanks
ramandeep-singh-1983 commentedon May 7, 2018
Since allowOutsideOutDir has been removed, what all options do i have?
@johnpapa i followed your guide to setup my project and my server is in src/server directory and it gets packaged in dist/ directory and my client app gets packaged in dist/public directory.
How can i migrate to Angular CLI 6.0.0 in this case when allowOutsideOutDir has been removed? As per this comment (#9363 (comment)), it seems that outside directories are working without this option now
Edit 1: The 'Path "/../" is invalid' error is not helpful at all. I am trying to migrate my 5.2.* project to 6.0.0 and i get this error while running the following command, it should at least give the file name and line number with the problem.
PS D:\Work\git_repos\ccw\client-app> ng update @angular/cli
Updating karma configuration
Updating configuration
Path "/../" is invalid.
Edit 2: I was able to resolve the 'Path "/../" is invalid error but not able to solve the main issue with it. I followed @johnpapa 's article and had the following in my .angular-cli.json:
"apps": [ { "root": "src/client", "outDir": "dist/public", "assets": [ "assets", "favicon.ico", { "glob": "index.js", "input": "../server/", "output": "../", "allowOutsideOutDir": true }, { "glob": "package.json", "input": "../server/", "output": "../" , "allowOutsideOutDir": true }, { "glob": "web.config", "input": "../server/", "output": "../", "allowOutsideOutDir": true }, "msal.js" ],The error comes because of this line: "output": "../". If i make it "output": "./", it works. Now, with allowOutsideOutDir support removed, i am not sure how i can deploy my client to dist/public and server to dist/
Edit 3: I used a workaround to make it work for now:
Specified "output" as "output": "./../" instead of "output": "../" as the code in common.js checks for strings beginning with "../". I really hope there is an option of making it work otherwise i will have to mix the server and client code in the same directory in the dist folder.
fix(@schematics/update): show warning for allowOutsideOutDir assets
fix(@schematics/update): show warning for allowOutsideOutDir assets
fix(@schematics/update): show warning for allowOutsideOutDir assets
fix(@schematics/update): show warning for allowOutsideOutDir assets
angular-automatic-lock-bot commentedon Sep 8, 2019
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.