gpt4 book ai didi

node.js - ./node_modules/@angular/core/esm5/core.js 中的错误找不到模块 : TypeError: dep. isEqualResource 不是函数

转载 作者:太空宇宙 更新时间:2023-11-03 22:23:59 24 4
gpt4 key购买 nike

我已经更新了 Angular 项目中的 package.json,更新后使用命令 ncu -u 在运行 ngserve 时出现以下错误

./node_modules/@angular/core/esm5/core.js 中出现错误找不到模块:TypeError:dep.isEqualResource 不是函数

尝试卸载 Node 模块并重新安装,但没有成功

在下面添加 Package.json。

{
"name": "material",
"private": true,
"version": "1.0.0",
"main": "",
"scripts": {
"ng": "ng",
"start": "ng serve",
"hmr": "ng serve --hmr -e=hmr",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"clean": "rimraf node_modules",
"clean-all": "rimraf node_modules dist dll && npm cache clean",
"reinstall": "rimraf node_modules && rm -f package-lock.json && npm install"
},
"dependencies": {
"@angular/animations": "^5.2.9",
"@angular/cdk": "^5.2.4",
"@angular/common": "^5.2.9",
"@angular/compiler": "^5.2.9",
"@angular/core": "^5.2.9",
"@angular/forms": "^5.2.9",
"@angular/http": "^5.2.9",
"@angular/material": "5.2.4",
"@angular/platform-browser": "^5.2.9",
"@angular/platform-browser-dynamic": "^5.2.9",
"@angular/platform-server": "^5.2.9",
"@angular/router": "^5.2.9",
"@types/underscore": "^1.8.8",
"angular-localstorage": "^1.1.5",
"angular2-csv": "^0.2.5",
"angular2-debounce": "^1.0.4",
"classlist.js": "^1.1.20150312",
"core-js": "^2.5.3",
"cors": "^2.8.4",
"easy-pie-chart": "^2.1.7",
"echarts": "^4.0.4",
"font-awesome": "^4.7.0",
"intl": "^1.2.5",
"jquery": "^3.3.1",
"jquery-slimscroll": "^1.3.8",
"jsonwebtoken": "^8.2.0",
"jspdf": "^1.3.5",
"jspdf-autotable": "^2.3.2",
"ng-circle-progress": "^0.9.9",
"ng2-toasty": "^4.0.3",
"ng2modules-easypiechart": "0.0.4",
"ngx-filter-pipe": "^2.1.0",
"reflect-metadata": "^0.1.12",
"rxjs": "^5.5.7",
"underscore": "^1.8.3",
"webfontloader": "^1.6.28",
"zone.js": "^0.8.20"
},
"devDependencies": {
"@angular/cli": "1.7.3",
"@angular/compiler-cli": "^5.2.9",
"@angularclass/hmr": "^2.1.3",
"@angularclass/hmr-loader": "^3.0.4",
"@auth0/angular-jwt": "^1.1.0",
"@types/core-js": "^0.9.46",
"@types/hammerjs": "^2.0.34",
"@types/jasmine": "^2.8.6",
"@types/jquery": "^3.3.1",
"@types/node": "^9.4.7",
"add-asset-html-webpack-plugin": "^2.1.3",
"angular-router-loader": "^0.8.2",
"angular2-template-loader": "^0.6.2",
"autoprefixer": "^8.1.0",
"awesome-typescript-loader": "^4.0.1",
"bootstrap": "^4.0.0",
"clarity-angular": "^0.10.27",
"codelyzer": "^4.2.1",
"copy-webpack-plugin": "^4.5.1",
"css-loader": "^0.28.11",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^1.1.11",
"hammerjs": "^2.0.8",
"html-webpack-plugin": "^3.0.7",
"json-loader": "^0.5.4",
"material-design-lite": "^1.3.0",
"moment": "^2.21.0",
"ng-router-loader": "^2.1.0",
"node-sass": "^4.8.2",
"postcss-loader": "^2.1.3",
"raw-loader": "^0.5.1",
"rimraf": "^2.6.2",
"sass-loader": "^6.0.7",
"style-loader": "^0.20.3",
"ts-helpers": "^1.1.2",
"ts-node": "^5.0.1",
"tslib": "^1.9.0",
"tslint": "^5.9.1",
"tslint-loader": "^3.6.0",
"typescript": "^2.7.2",
"webpack": "^4.2.0",
"webpack-dev-server": "^3.1.1",
"webpack-dll-bundles-plugin": "^1.0.0-beta.5",
"webpack-merge": "^4.1.2"
},
"engines": {
"node": ">=6.9.0",
"npm": ">= 3"
}
}

最佳答案

我也遇到了同样的问题。我通过删除 devDepcies 列表中与 webpack 相关的包来解决这个问题。 "@angular/cli" 包处理所有 webpack 工作。

在您的示例中删除该行,然后再次运行 npm install 命令:

"webpack": "^4.2.0",
"webpack-dev-server": "^3.1.1",
"webpack-dll-bundles-plugin": "^1.0.0-beta.5",
"webpack-merge": "^4.1.2"

希望它对你有用。

关于node.js - ./node_modules/@angular/core/esm5/core.js 中的错误找不到模块 : TypeError: dep. isEqualResource 不是函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49404799/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com