-
Notifications
You must be signed in to change notification settings - Fork 12k
@angular/cli gives error if node_modules is placed in parent folder #11823
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
Comments
You can try using version < 6.1.0 and it will work. I think this issue is the same as this https://github.com/angular/angular-cli/issues/11685 |
Indeed you are right, but instead I went with temporarily having But for people whom this is not a viable solution (I believe people using Docker can't install |
I hope that they fix this .. monorepos are really cool and I don’t like experimenting either because as you mention, they may change the way it works and then you will habe to redo everything again 😥 |
Thanks all, I agree it's a dupe of #11685 looks like we need a test case for this |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Probably related to #3864
Bug Report or Feature Request (mark with an
x
)Command (mark with an
x
)Versions
node version: v8.11.3
npm version: 5.5.1
Repro steps
npm install
in parent folder (node-modules-parent-folder
)cd frontend
for angular project folderng serve
to build and runThe log given by the failure
You seem to not be depending on "@angular/core" and/or "rxjs". This is an error.
Desired functionality
It should automatically navigate to parent folder (as per node resolution) and find the
@angular/core
andrxjs
.Mention any other details that might be useful
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
is changed to point to"$schema": "../node_modules/@angular/cli/lib/config/schema.json",
(../node_modules instead of ./node_modules)Please note that while this could simply be solved by installing the
node_modules
in the Angular project folder, since my project is usingserver-side-rendering (using Angular Universal)
, it's more convenient to have thenode_modules
in the parent folder shared by bothfrontend
andbackend
My project structure is something like this:
The text was updated successfully, but these errors were encountered: