Comments (13)
因为使用的是路由懒加载,js是被脚本分割成一块一块按需加载,底部、搜索框和头部都是App.vue注册的组件,会在页面打开时正确载入三部分js,而其他组件生成的js因为你修改路径的原因,没能正确加载出来。建议你不要修改路径,也不要手动打开/dist/index.html,应该在/dist下开启http服务 http-server
当然 你需要先安装这个插件,npm install http-server -g
from vue-wechat.
我明白前面话的意思,但是我不懂
from vue-wechat.
大牛,我明白之前话的意思,也按照你的意思install 了http-server,但请问下下面的步骤是什么吗?
就是在/dis下开启http服务这应该需要如何操作呢?小白第一次尝试麻烦了。
from vue-wechat.
在 /dist 目录下运行命令 http-server
会有类似下面的提示
Starting up http-server, serving ./
Available on:
http://172.18.30.95:8080
http://127.0.0.1:8080
然后你在浏览器中访问它输出给你的 http 地址 就像上面的
from vue-wechat.
谢谢大牛!我跑起来了!!!
from vue-wechat.
大神有时间能把Build打包后上线流程写一下么,我也遇到那个朋友相同的问题,上传到服务器后,不改index路径的话,会有路径问题,改了路径又有 Error: Loading chunk 3 failed. 这个问题,小白实在是不知道从何入手去修改了
from vue-wechat.
你需要了解webpack的output.publicPath解决路径问题,修改config/index.js里的build对象
from vue-wechat.
感谢指导,成功的解决了问题 需要将 assetsPublicPath: '/' 改成assetsPublicPath: './' 再次感谢
from vue-wechat.
我在我的webpack.base.conf里面加了{
test: /.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test')]
},这段 可是还是报Uncaught SyntaxError: Unexpected token import 请问一下什么意思
from vue-wechat.
chalk装上 项目也跑不起来
vue-WeChat-master>npm run dev
[email protected] dev D:\Front\vue-WeChat-master
node build/dev-server.js
module.js:550
throw err;
^
Error: Cannot find module 'chalk'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (D:\Front\vue-WeChat-master\build\check-versions.js:1:75)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: node build/dev-server.js
npm ERR! Exit status 1
from vue-wechat.
from vue-wechat.
@githublxx 这个bug 是window 独有的,
当你安装chalk后又会提示你缺另一个。
出现问题的原因是: 你下载node 模块时中断过(模块的下载机制是先下载配置文件后下载详细内容,模块的判断机制是读取是否有配置文件,这里的bug)
简单的解决方法是 删除你本地的node_modules 然后重新执行 一遍(c)npm install 就可以了。
from vue-wechat.
大牛,在浏览器中没有办法发送消息,是只能在手机上发送,电脑上没办法发送嘛,还是没有做发送的功能啊
from vue-wechat.
Related Issues (20)
- 项目跑不起来 HOT 1
- 通讯录->搜索->页面向上滑,可以看到朋友列表啊
- 有考虑用微信小程序写一个微信聊天吗? HOT 1
- 想问你一下,那个vux用localhost可以访问,但是ios10.3微信端就是不行,知道怎么解决吗? HOT 1
- index.html引入js文件作用 HOT 1
- 路由设置方式疑惑 HOT 3
- build打包提示找不到文件 HOT 1
- WxHeader好像没有固定吧? HOT 1
- 好像缺个登陆页。哈哈 HOT 4
- build 报错文件路径不对 HOT 1
- 我也有一个问题
- 聊天内容无法发送也
- 自已发的信息与对方发的信息都在同一侧面
- 建议改成vue-cli3.0 HOT 4
- 语音录入touchstart touchend 触发两次
- 这项目没有维护了吗 HOT 2
- 请问一下,这个我可以在uniapp 项目中作为一个组件使用吗? HOT 2
- 双向聊天 HOT 1
- 消息列表组件 HOT 2
- 跑起来之后,经过测试电脑端和手机端都能正常使用,但是发现不能聊天?请问怎么解决? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-wechat.