error when Download angular: [ERROR] ionic-app-scripts has unexpectedly closed (exit code 1)

created at 09-06-2021 views: 183

A downloaded angular+ionic3 project, run the terminal command ionic serve to display an error as follows:

> ionic-app-scripts.cmd serve --address localhost --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser [app-scripts] internal/modules/cjs/loader.js:888 [app-scripts] throw err; [app-scripts] ^ [app-scripts] Error: Cannot find module 'C:\Users\lihua.wu\Desktop\APAC-AcumerApp\node_modules\@ionic\app-scripts\bin\ionic-app-scripts.js' [app-scripts] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15) [app-scripts] at Function.Module._load (internal/modules/cjs/loader.js:730:27) [app-scripts] at internal/main/run_main_module.js:17:47 { [app-scripts] code: 'MODULE_NOT_FOUND', [app-scripts] requireStack: [] [app-scripts] } [ERROR] ionic-app-scripts has unexpectedly closed (exit code 1). 


Delete the node_modules folder and run the terminal command

npm install @ionic/app-scripts@latest --save-dev
created at:09-06-2021
edited at: 09-06-2021: