-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
npm run dev 打开网页登陆报 405 #2865
Comments
这个判断是生产环境启用mock,把 production 改为 development 就行了 |
嗯,只是直接根据教程 git clone 下来之后再 npm run dev 无法使用会让一些新手懵逼 |
在main.js中,在下面这处把production改为development,因为在dev模式下,原来的代码没有启动mock |
确实。对着教程来做,结果一直无法登录。对着 Google 搜了半天一直以为是 npm install 那步有问题,重试了好多次。教程对这块完全没有说明,对新人很不友好。 |
注释了这个判断就可以了:if (process.env.NODE_ENV === 'production') { |
重新拉取最新代码已修复。 |
Bug report(问题描述)
Steps to reproduce(问题复现步骤)
直接
npm run dev
后打开网页直接登陆会报405,method not allowedScreenshot or Gif(截图或动态图)
Link to minimal reproduction(最小可在线还原demo)
Other relevant information(格外信息)
需要将 main.js 中的
中的 if 部分去掉即可
The text was updated successfully, but these errors were encountered: