我正在使用 smartAdmin 构建应用程序。每当我从 npm 安装任何软件包而不是尝试运行应用程序时
服务
它开始出现错误,我无法解决这些错误,我必须始终恢复一些备份。
最近我安装ngx-device-detector
了
npm install ngx-device-detector --save
而不是我运行应用程序
ng serve --open 并且控制台上出现以下错误。
ERROR in Metadata version mismatch for module D:/ob/Admin/ccAngular/node_modules/ngx-device-detector/ngx-device-detector.d.ts, found version 4, expected 3, resolving symbol HomeModule in D:/ob/Admin/ccAngular/src/app/home/home.module.ts, resolving symbol HomeModule in D:/ob/Admin/ccAngular/src/app/home/home.module.ts, resolving symbol HomeModule in D:/ob/Admin/ccAngular/src/app/home/home.module.ts
ERROR in ./~/jquery/lib/node-jquery.js
Module not found: Error: Can't resolve 'location' in 'D:\ob\Admin\ccAngular\node_modules\jquery\lib'
@ ./~/jquery/lib/node-jquery.js 13:24-43
@ ./src/lib.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
ERROR in ./~/jquery/lib/node-jquery.js
Module not found: Error: Can't resolve 'navigator' in 'D:\ob\Admin\ccAngular\node_modules\jquery\lib'
@ ./~/jquery/lib/node-jquery.js 17:25-45
@ ./src/lib.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
ERROR in ./~/xmlhttprequest/lib/XMLHttpRequest.js
Module not found: Error: Can't resolve 'child_process' in 'D:\ob\Admin\ccAngular\node_modules\xmlhttprequest\lib'
@ ./~/xmlhttprequest/lib/XMLHttpRequest.js 15:12-36
@ ./~/jquery/lib/node-jquery.js
@ ./src/lib.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
ERROR in ./~/jsdom/lib/jsdom/living/xmlhttprequest.js
Module not found: Error: Can't resolve 'child_process' in 'D:\ob\Admin\ccAngular\node_modules\jsdom\lib\jsdom\living'
@ ./~/jsdom/lib/jsdom/living/xmlhttprequest.js 4:18-42
@ ./~/jsdom/lib/jsdom/browser/Window.js
@ ./~/jsdom/lib/jsdom.js
@ ./~/jquery/lib/node-jquery.js
@ ./src/lib.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
webpack: Failed to compile.
请帮我解决这个问题。