S. DANIEL DEEPAK
S. DANIEL DEEPAK

Reputation: 23

Updating Angular 6 to angular 7 got error

When updating angular 6 to angular 7 I got error. I first used this command npm i -g rxjs-tslint. And then I used this command rxjs-5-to-6-migrate -p src/tsconfig.app.json.I got this error.

        module.js:550
            throw err;
            ^

        Error: Cannot find module 'typescript'
            at Function.Module._resolveFilename (module.js:548:15)
            at Function.Module._load (module.js:475:25)
            at Module.require (module.js:597:17)
            at require (internal/module.js:11:18)
            at Object.<anonymous> (/usr/lib/node_modules/rxjs-tslint/node_modules/tslint/lib/linter.js:22:10)
            at Module._compile (module.js:653:30)
            at Object.Module._extensions..js (module.js:664:10)
            at Module.load (module.js:566:32)
            at tryModuleLoad (module.js:506:12)
            at Function.Module._load (module.js:498:3)
        child_process.js:645
            throw err;
            ^

        Error: Command failed: "/usr/lib/node_modules/rxjs-tslint/node_modules/.bin/tslint" -c "/usr/lib/node_modules/rxjs-tslint/rxjs-5-to-6-migrate.json" -p "src/tsconfig.app.json" --fix
        module.js:550
            throw err;
            ^

        Error: Cannot find module 'typescript'
            at Function.Module._resolveFilename (module.js:548:15)
            at Function.Module._load (module.js:475:25)
            at Module.require (module.js:597:17)
            at require (internal/module.js:11:18)
            at Object.<anonymous> (/usr/lib/node_modules/rxjs-tslint/node_modules/tslint/lib/linter.js:22:10)
            at Module._compile (module.js:653:30)
            at Object.Module._extensions..js (module.js:664:10)
            at Module.load (module.js:566:32)
            at tryModuleLoad (module.js:506:12)
            at Function.Module._load (module.js:498:3)

            at checkExecSyncError (child_process.js:602:13)
            at Object.execSync (child_process.js:642:13)
            at migrate (/usr/lib/node_modules/rxjs-tslint/rxjs-5-to-6-migrate.js:18:34)
            at Object.<anonymous> (/usr/lib/node_modules/rxjs-tslint/rxjs-5-to-6-migrate.js:25:14)
            at Module._compile (module.js:653:30)
            at Object.Module._extensions..js (module.js:664:10)
            at Module.load (module.js:566:32)
            at tryModuleLoad (module.js:506:12)
            at Function.Module._load (module.js:498:3)
            at Module.require (module.js:597:17)

Upvotes: 0

Views: 343

Answers (1)

Srishti Khandelwal
Srishti Khandelwal

Reputation: 587

This release needs upgrade: It requires typescript to be installed globally. Also the user must manually add "typescript" as a dev dependency to existing projects. Otherwise, there will be build errors.

Upvotes: 3

Related Questions