File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
packages/angular/cli/upgrade Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 77 */
88
99import { tags , terminal } from '@angular-devkit/core' ;
10+ import { resolve } from '@angular-devkit/core/node' ;
1011import * as path from 'path' ;
1112import { SemVer , satisfies } from 'semver' ;
1213import { isWarningEnabled } from '../utilities/config' ;
@@ -53,9 +54,13 @@ export class Version {
5354 } ;
5455
5556 try {
56- const resolveOptions = { paths : [ path . join ( projectRoot , 'node_modules' ) , projectRoot ] } ;
57- const angularPackagePath = require . resolve ( '@angular/core/package.json' , resolveOptions ) ;
58- const rxjsPackagePath = require . resolve ( 'rxjs/package.json' , resolveOptions ) ;
57+ const resolveOptions = {
58+ basedir : projectRoot ,
59+ checkGlobal : false ,
60+ checkLocal : true ,
61+ } ;
62+ const angularPackagePath = resolve ( '@angular/core/package.json' , resolveOptions ) ;
63+ const rxjsPackagePath = resolve ( 'rxjs/package.json' , resolveOptions ) ;
5964
6065 if ( ! isInside ( projectRoot , angularPackagePath )
6166 || ! isInside ( projectRoot , rxjsPackagePath ) ) {
You can’t perform that action at this time.
0 commit comments