Skip to content

Error: Option "rootDir" is not defined #165

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

Closed
hemedah101 opened this issue Mar 20, 2020 · 6 comments
Closed

Error: Option "rootDir" is not defined #165

hemedah101 opened this issue Mar 20, 2020 · 6 comments

Comments

@hemedah101
Copy link

hemedah101 commented Mar 20, 2020

I'm submitting a...


[ ] Regression 
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

Iam trying to follow the example here https://trilon.io/blog/deploy-nestjs-azure-functions
for azure functions deployment, however I keep getting this error


$ nest add @nestjs/azure-func-http
√ Installation in progress... ☕
Error: Option "rootDir" is not defined.
    at C:\Users\hemed\Desktop\_coreteck\gray\pos-system-backend\node_modules\@angular-devkit\schematics\src\rules\template.js:85:27     
    at C:\Users\hemed\Desktop\_coreteck\gray\pos-system-backend\node_modules\@angular-devkit\schematics\src\rules\base.js:109:30        
    at C:\Users\hemed\.npm-global\node_modules\@nestjs\cli\node_modules\@angular-devkit\schematics\src\tree\host-tree.js:233:13
    at C:\Users\hemed\.npm-global\node_modules\@nestjs\cli\node_modules\@angular-devkit\schematics\src\tree\host-tree.js:41:59
    at Array.forEach ()
    at HostDirEntry.visit (C:\Users\hemed\.npm-global\node_modules\@nestjs\cli\node_modules\@angular-devkit\schematics\src\tree\host-tree.js:41:43)
    at HostCreateTree.visit (C:\Users\hemed\.npm-global\node_modules\@nestjs\cli\node_modules\@angular-devkit\schematics\src\tree\host-tree.js:232:19)
    at C:\Users\hemed\Desktop\_coreteck\gray\pos-system-backend\node_modules\@angular-devkit\schematics\src\rules\base.js:105:14        
    at MergeMapSubscriber.project (C:\Users\hemed\Desktop\_coreteck\gray\pos-system-backend\node_modules\@angular-devkit\schematics\src\rules\call.js:74:24)
    at MergeMapSubscriber._tryNext (C:\Users\hemed\Desktop\_coreteck\gray\pos-system-backend\node_modules\@angular-devkit\schematics\node_modules\rxjs\internal\operators\mergeMap.js:69:27)

Expected behavior

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment


Nest version: 7.0.3

 
For Tooling issues:
- Node version: 12.14  
- Platform:  Windows 

Others:

package manager: yarn
@kamilmysliwiec
Copy link
Member

Thanks for reporting!

@Jefiozie I'm not certainly sure, but it seems that the nest add was broken for repos that don't contain nest-cli.json file (which is valid). Missing fallback to a default value(?)

@Jefiozie
Copy link
Contributor

@kamilmysliwiec, probably it is best to revert my commit. I'm already working on the PR to resolve the problems(and others) reported in the past days. However I need some time to finish this. I'm really sorry this is happening.

@kamilmysliwiec
Copy link
Member

No worries @Jefiozie, your contribution is great! Bugs are an integral part of new features :)

@Jefiozie
Copy link
Contributor

Thanks for your understanding, I will make a draft PR in upcoming day(s) so that we can have a discussion and can monitor the progress there.

@Jefiozie
Copy link
Contributor

@kamilmysliwiec just made the draft PR see here

@kamilmysliwiec
Copy link
Member

This should be fixed now. Let me know if you face any further issues

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

No branches or pull requests

3 participants