解决uniapp 报错 chunk-vendors.js:25968 GET http://localhost:8080/sockjs-node/info?t=15996357

本文介绍如何在项目中配置sockjs及其客户端的依赖项,通过在package-lock.json文件中添加特定条目来确保版本控制和项目稳定性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在目录中新建一个package-lock.json
然后在里面添加:
“sockjs”:{
“dev”: false
},
“sockjs-client” :{
“dev”: false
}

<resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> <includes> <include>*.properties</include> <include>*.yml</include> </includes> </resource> <resource> <directory>src/main/resources</directory> <filtering>false</filtering> <includes> <include>*.sql</include> </includes> </resource> <resource> <directory>src/main/resources</directory> <filtering>false</filtering> <includes> <include>static/**</include> </includes> <targetPath>${project.build.outputDirectory}</targetPath> </resource> </resources> server.port=8081 server.servlet.context-path=/demo logging.level.com.esoft.crm.mapper=debug spring.datasource.url=jdbc:h2:file:./test;MODE=MySQL;CASE_INSENSITIVE_IDENTIFIERS=TRUE;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false spring.datasource.driver-class-name=org.h2.Driver spring.datasource.username=sa spring.datasource.password= spring.h2.console.enabled=true spring.h2.console.path=/h2-console #spring.sql.init.mode=always #spring.sql.init.schema-locations=classpath:schema.sql #spring.sql.init.data-locations=classpath:data.sql spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect logging.level.org.hibernate.SQL=debug logging.level.org.hibernate.type.descriptor.sql=trace spring.datasource.hikari.connection-timeout=30000 spring.datasource.hikari.maximum-pool-size=10 #spring.sql.init.mode=always #spring.sql.init.schema-locations=classpath:schema.sql #spring.sql.init.data-locations=classpath:data.sql spring.datasource.schema=classpath:schema.sql spring.datasource.data=classpath:data.sql spring.datasource.initialization-mode=always spring.web.resources.static-locations=classpath:/static/ spring.mvc.static-path-pattern=/static/** mybatis.mapper-locations=classpath:mapper/*.xml mybatis.type-aliases-package=com.esoft.crm.po,com.esoft.crm.vo 且前端页面资源(css,img,index.html)等都存在与resource/static下,且没有打包,直接在idea环境下运行,运行后前端打不开,报错GET http://localhost:8080/js/chunk-vendors.1a0a0613.js net::ERR_CONNECTION_REFUSED :8080/img/icons/favicon-32x32.png:1 GET http://localhost:8080/img/icons/favicon-32x32.png net::ERR_CONNECTION_REFUSED :8080/img/icons/android-chrome-192x192.png:1 GET http://localhost:8080/img/icons/android-chrome-192x192.png net::ERR_CONNECTION_REFUSED :8080/img/icons/favicon-16x16.png:1 GET http://localhost:8080/img/icons/favicon-16x16.png net::ERR_CONNECTION_REFUSED localhost/:1 Error while trying to use the following icon from the Manifest: http://localhost:8080/img/icons/android-chrome-192x192.png (Download error or resource isn't a valid image),访问http://localhost:8081/demo/static/js/chunk-vendors.1a0a0613.js成功,内容是...//# sourceMappingURL=chunk-vendors.1a0a0613.js.map
07-03
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值