A busy question! Solving the message ' Cannot find module 'typescript''

Thanks for your visiting.
I am a beginner in Ionic so I want to run the first example.
But ‘Cannot find module typescript’ message is shown, I am tired to solve it.
Help me.
Thanks in advance.

D:\building>ionic serve

ionic-app-scripts.cmd serve --address localhost --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
[app-scripts] internal/modules/cjs/loader.js:797
[app-scripts] throw err;
[app-scripts] ^
[app-scripts] Error: Cannot find module ‘typescript’
[app-scripts] Require stack:
[app-scripts] - D:\building\node_modules@ionic\app-scripts\dist\transpile.js
[app-scripts] - D:\building\node_modules@ionic\app-scripts\dist\build\util.js
[app-scripts] - D:\building\node_modules@ionic\app-scripts\dist\build.js
[app-scripts] - D:\building\node_modules@ionic\app-scripts\dist\index.js
[app-scripts] - D:\building\node_modules@ionic\app-scripts\bin\ionic-app-scripts.js
[app-scripts] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
[app-scripts] at Function.Module._load (internal/modules/cjs/loader.js:687:27)
[app-scripts] at Module.require (internal/modules/cjs/loader.js:849:19)
[app-scripts] at require (internal/modules/cjs/helpers.js:74:18)
[app-scripts] at Object. (D:\building\node_modules@ionic\app-scripts\dist\transpile.js:42:10)
[app-scripts] at Module._compile (internal/modules/cjs/loader.js:956:30)
[app-scripts] at Object.Module._extensions…js (internal/modules/cjs/loader.js:973:10)
[app-scripts] at Module.load (internal/modules/cjs/loader.js:812:32)
[app-scripts] at Function.Module._load (internal/modules/cjs/loader.js:724:14)
[app-scripts] at Module.require (internal/modules/cjs/loader.js:849:19) {
[app-scripts] code: ‘MODULE_NOT_FOUND’,
[app-scripts] requireStack: [
[app-scripts] ‘D:\building\node_modules\@ionic\app-scripts\dist\transpile.js’,
[app-scripts] ‘D:\building\node_modules\@ionic\app-scripts\dist\build\util.js’,
[app-scripts] ‘D:\building\node_modules\@ionic\app-scripts\dist\build.js’,
[app-scripts] ‘D:\building\node_modules\@ionic\app-scripts\dist\index.js’,

[ERROR] ionic-app-scripts has unexpectedly closed (exit code 1).

    The Ionic CLI will exit. Please check any output above for error details.

Add your package.json file contents
And also the results of $ ionic info in your project directory so we can see what you’re working with

Yup, this is an error that happens on a regular basis. The project node_module folder gets corrupted (given the open-source nature, it isn’t surprising, but the solution isn’t obvious)

If ng serve generates an “internal/modules/cjs/loader.js throw err;”
then, from app root folder run:

rm -rf node_modules
npm install

After it is done, you should be able to build and serve the application.