umijs / umi

A framework in react community ✨
https://umijs.org
MIT License
15.3k stars 2.65k forks source link

[Bug] 项目执行了npm start后,LessError 报错,怎么处理 #9615

Closed 429299291 closed 1 year ago

429299291 commented 1 year ago

npm包整体升级后,就报错了 下面是我的package.json { "name": "ant-design-pro", "version": "2.1.0", "description": "An out-of-box UI solution for enterprise applications", "private": true, "scripts": { "presite": "node ./scripts/generateMock.js && cd functions && npm install", "start": "cross-env APP_TYPE=site umi dev", "start:no-mock": "cross-env MOCK=none umi dev", "build": "umi build", "site": "npm run presite && cross-env APP_TYPE=site npm run build && firebase deploy", "analyze": "cross-env ANALYZE=1 umi build", "lint:style": "stylelint \"src/*/.less\" --syntax less", "lint": "eslint --ext .js src mock tests && npm run lint:style", "lint:fix": "eslint --fix --ext .js src mock tests && npm run lint:style", "lint-staged": "lint-staged", "lint-staged:js": "eslint --ext .js", "tslint": "npm run tslint:fix", "tslint:fix": "tslint --fix 'src//.ts'", "test": "umi test", "test:component": "umi test ./src/components", "test:all": "node ./tests/run-tests.js", "prettier": "prettier --write './src//*'", "docker:dev": "docker-compose -f ./docker/docker-compose.dev.yml up", "docker:build": "docker-compose -f ./docker/docker-compose.dev.yml build", "docker-prod:dev": "docker-compose -f ./docker/docker-compose.yml up", "docker-prod:build": "docker-compose -f ./docker/docker-compose.yml build" }, "dependencies": { "@ant-design/icons": "^4.7.0", "@antv/data-set": "^0.9.6", "@babel/runtime": "^7.19.4", "antd": "^4.23.5", "babel-plugin-module-resolver": "^3.2.0", "bizcharts": "^3.5.10", "bizcharts-plugin-slider": "^2.0.3", "classnames": "^2.3.2", "cors": "^2.8.5", "dva": "^2.4.0", "enquire-js": "^0.2.1", "hash.js": "^1.1.7", "lodash": "^4.17.21", "lodash-decorators": "^6.0.1", "memoize-one": "^4.0.3", "moment": "^2.29.4", "moment-timezone": "^0.5.37", "numeral": "^2.0.6", "nzh": "^1.0.8", "omit.js": "^1.0.2", "path-to-regexp": "^2.4.0", "prop-types": "^15.8.1", "qs": "^6.11.0", "rc-animate": "^2.11.1", "react": "^16.14.0", "react-container-query": "^0.11.3", "react-copy-to-clipboard": "^5.1.0", "react-d3-library": "^1.1.8", "react-document-title": "^2.0.3", "react-dom": "^16.14.0", "react-fittext": "^1.0.0", "react-google-maps": "^9.4.5", "react-router-dom": "^4.3.1", "react-vis": "^1.11.7", "recharts": "^1.8.5", "recompose": "^0.30.0", "reqwest": "^2.0.5" }, "devDependencies": { "@types/react": "^16.14.32", "@types/react-dom": "^16.9.16", "antd-pro-merge-less": "^0.0.9", "antd-theme-webpack-plugin": "^1.3.9", "babel-eslint": "^10.1.0", "cross-env": "^5.2.1", "cross-port-killer": "^1.4.0", "enzyme": "^3.11.0", "eslint": "^5.16.0", "eslint-config-airbnb": "^17.1.1", "eslint-config-prettier": "^3.6.0", "eslint-plugin-babel": "^5.3.1", "eslint-plugin-compat": "^2.7.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-jsx-a11y": "^6.6.1", "eslint-plugin-markdown": "^1.0.2", "eslint-plugin-react": "^7.31.10", "gh-pages": "^2.2.0", "husky": "^1.3.1", "less": "^3.13.1", "less-loader": "^11.1.0", "lint-staged": "^7.2.0", "merge-umi-mock-data": "^0.0.3", "mockjs": "^1.1.0", "node": "^14.16.1", "oocss": "0.0.3", "prettier": "1.14.3", "pro-download": "^1.0.1", "stylelint": "^9.10.1", "stylelint-config-prettier": "^4.0.0", "stylelint-config-standard": "^18.3.0", "tslint": "^5.20.1", "tslint-config-prettier": "^1.18.0", "tslint-react": "^3.6.0", "umi": "^2.13.18", "umi-plugin-ga": "^1.1.8", "umi-plugin-react": "^1.15.9" }, "optionalDependencies": { "puppeteer": "^1.9.0" }, "engines": { "node": ">=8.0.0" }, "browserslist": [ "> 1%", "last 2 versions", "not ie <= 10" ] }

这是我的报错信息

Without from option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to undefined to prevent this warning. Error occurred compiling file /Users/zhudongdong/Desktop/home/src/pages/Account/Center/Center.less Error [LessError: .textOverflow is undefined] { type: 'Name', filename: '/Users/zhudongdong/Desktop/home/src/pages/Account/Center/Center.less', index: 1269, line: 85, column: 4, callLine: NaN, callExtract: undefined, extract: [ ' transition: color 0.3s;', ' .textOverflow();', '' ] } image

github-actions[bot] commented 1 year ago

由于缺乏足够的信息,我们暂时关闭了该 Issue。请修改(不要回复) Issue 提供最小重现以重新开启。谢谢。