Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot GET / #2

Open
liubangde88 opened this issue Jan 23, 2022 · 1 comment
Open

Cannot GET / #2

liubangde88 opened this issue Jan 23, 2022 · 1 comment

Comments

@liubangde88
Copy link

系统信息:MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports)
node version: v16.13.2
使用yarn 构建

4000 上的端口打开了,4000 上的接口可以正常访问

但是3000 上的页面报错Cannot GET /, 查看命令行发现错误信息:
Listening at http://localhost:3000

WAIT Compiling... 下午6:23:02

ERROR Failed to compile with 1 errors 下午6:23:02

error in ./src/main.js

Module build failed: Error: Failed to load plugin node: Cannot find module 'eslint-plugin-node'
Require stack:

尝试解决:
npm install eslint-plugin-import eslint-plugin-flowtype eslint-plugin-jsx-a11y eslint-plugin-react
npm install eslint-plugin-import --save-dev
等等一系列修复方式,仍未解决。

@liubangde88
Copy link
Author

好吧,解决了
eslint 和 eslint-loader 版本太低了
{
"name": "framework7-vue-h5plus",
"description": "A web app made with Framework7 Vue & H5Plus.With Hbuilder you can easily convert it to native iOS app.",
"version": "1.1.0",
"author": "iamxiaoma",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/iamxiaoma/framework7-vue-h5plus.git"
},
"scripts": {
"dev": "node build/dev-server.js",
"build": "node build/build.js",
"lint": "eslint --ext .js,.vue src"
},
"keywords": [
"ios",
"webpack",
"framework7",
"vue",
"vuejs",
"material",
"mobile",
"app",
"f7"
],
"bugs": {
"url": "https://github.com/iamxiaoma/framework7-vue-h5plus/issues"
},
"homepage": "http://framework7.cn",
"dependencies": {
"axios": "^0.15.3",
"framework7": "^1.6.5",
"framework7-vue": "^0.8.5",
"lodash": "^4.17.4",
"moment": "^2.20.1",
"es6-object-assign": "^1.1.0",
"es6-promise": "^4.2.2",
"vue": "^2.5.13",
"vue-i18n": "^5.0.3",
"vuex": "^2.5.0"
},
"devDependencies": {
"autoprefixer": "^6.7.2",
"babel-core": "^6.22.1",
"babel-eslint": "^7.1.1",
"babel-loader": "^6.2.10",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-preset-env": "^1.2.1",
"babel-preset-stage-2": "^6.22.0",
"babel-register": "^6.22.0",
"chalk": "^1.1.3",
"connect-history-api-fallback": "^1.3.0",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.26.1",
"eslint": "^3.19.0",
"eslint-config-coremail": "^0.1.1",
"eslint-friendly-formatter": "^2.0.7",
"eslint-loader": "^3.0.0",
"eslint-plugin-html": "^2.0.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^2.0.1",
"eventsource-polyfill": "^0.9.6",
"express": "^4.14.1",
"extract-text-webpack-plugin": "^2.0.0",
"file-loader": "^0.10.0",
"friendly-errors-webpack-plugin": "^1.1.3",
"function-bind": "^1.1.0",
"html-webpack-plugin": "^2.28.0",
"http-proxy-middleware": "^0.17.3",
"less": "^2.7.2",
"less-loader": "^3.0.0",
"opn": "^4.0.2",
"optimize-css-assets-webpack-plugin": "^1.3.0",
"ora": "^1.1.0",
"rimraf": "^2.6.0",
"semver": "^5.3.0",
"url-loader": "^0.5.7",
"vue-loader": "^11.1.4",
"vue-style-loader": "^2.0.0",
"vue-template-compiler": "^2.2.1",
"webpack": "^2.2.1",
"webpack-bundle-analyzer": "^2.2.1",
"webpack-dev-middleware": "^1.10.0",
"webpack-hot-middleware": "^2.16.1",
"webpack-merge": "^2.6.1"
},
"engines": {
"node": ">= 4.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
改过之后的
页面效果
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant