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

遇到前端启动后报错的情况的解决办法 #9

Open
krank666 opened this issue Nov 10, 2019 · 8 comments
Open

遇到前端启动后报错的情况的解决办法 #9

krank666 opened this issue Nov 10, 2019 · 8 comments
Labels
good first issue Good for newcomers

Comments

@krank666
Copy link
Member

我是联合开发者krank666
诸君更新代码后使用时如遇到启动后前端页面报错无法使用的情况,请在命令行工具输入npm install即可

@jiftle
Copy link

jiftle commented Sep 15, 2020

如下警告,可以选择忽略,不影响run serve的启动。 可以正常访问呢

Module Warning (from ./node_modules/_eslint-loader@2.2.1@eslint-loader/index.js):
error: Unnecessary escape character: \_ (no-useless-escape) at src/utils/stringFun.js:17:26:
  15 |   // 下划线转换驼峰
  16 |   export const  toHump = (name) => {
> 17 |     return name.replace(/\_(\w)/g, function(all, letter){
     |                          ^
  18 |         return letter.toUpperCase();
  19 |     });
  20 | }

@IreneShiLei
Copy link

if db, err := gorm.Open(mysql.New(mysqlConfig), gormConfig(m.LogMode)); err != nil {
global.GVA_LOG.Error("MySQL启动异常", zap.Any("err", err))
这报错
-》 go.uber.org/zap.(*Logger).check(0x0, 0x2, 0x1564cd2, 0x11, 0xc00028c040)

@WhiteCjy
Copy link

用npm run build打包后部署到服务器,通过nginx访问就抱如下错误,本地npm run server没问题
TypeError: u.default.addRoute is not a function
at app.41286454.js:1
at Array.forEach ()
at app.41286454.js:1
at l (chunk-libs.7ad5b2a1.js:34)
at Generator._invoke (chunk-libs.7ad5b2a1.js:34)
at Generator.next (chunk-libs.7ad5b2a1.js:34)
at r (chunk-libs.7ad5b2a1.js:1)
at s (chunk-libs.7ad5b2a1.js:1)

@kirer
Copy link

kirer commented May 24, 2021

用npm run build打包后部署到服务器,通过nginx访问就抱如下错误,本地npm run server没问题
TypeError: u.default.addRoute is not a function
at app.41286454.js:1
at Array.forEach ()
at app.41286454.js:1
at l (chunk-libs.7ad5b2a1.js:34)
at Generator._invoke (chunk-libs.7ad5b2a1.js:34)
at Generator.next (chunk-libs.7ad5b2a1.js:34)
at r (chunk-libs.7ad5b2a1.js:1)
at s (chunk-libs.7ad5b2a1.js:1)

我也遇到这个问题,解决了吗

@liaoyinyu
Copy link

liaoyinyu commented Jul 6, 2021

用 npm run build 打包到后端服务器,返回的前端页面出错,本地npm run server 没有问题

打开前端文件 index.html 发现 id=“app” 的标签为空
<div id="app"></div>

用的版本是2.4.2

@bypanghu bypanghu unpinned this issue Sep 8, 2021
@bypanghu
Copy link
Member

各位开发者,因为众所周知的原因,国内的npm仓库DNS污染很严重,所以下载速度很慢(大部分情况都会被墙)。gva前端开发组推荐搭建采用 yarnpnpm 的方式,千万不要采用cnpm ,很容易出现bug!

@bypanghu
Copy link
Member

用npm run build打包后部署到服务器,通过nginx访问就抱如下错误,本地npm run server没问题 TypeError: u.default.addRoute is not a function at app.41286454.js:1 at Array.forEach () at app.41286454.js:1 at l (chunk-libs.7ad5b2a1.js:34) at Generator._invoke (chunk-libs.7ad5b2a1.js:34) at Generator.next (chunk-libs.7ad5b2a1.js:34) at r (chunk-libs.7ad5b2a1.js:1) at s (chunk-libs.7ad5b2a1.js:1)

请不要使用 国内代理

@bypanghu
Copy link
Member

IreneShiLei

你得首先看看你的 mysql 是不是能ping通……然后看看是否走的自动化

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

No branches or pull requests

8 participants
@IreneShiLei @kirer @jiftle @WhiteCjy @krank666 @liaoyinyu @bypanghu and others