Closed umphp closed 6 years ago
dev就是停留在 node build/dev-server.js
重新安装依赖试试
"mpvue-loader": "1.0.12" 试下
重新安装依赖,及换"mpvue-loader": "1.0.12" 后重新安装,问题如故。
eslint --ext .js,.vue src 也没有语法错误
增加了路由具体是做了什么
例如:先加一个路由 /pages/a/b ,然后有时正常开发者工具里就能看到新加的页面b, 如若不正常时,工具能提示/pages/a/b文件找不着,删除 /pages/a/b后,再建个 /pages/a/c,结果看到的,还是提示 /pages/a/b找不着。 再次npm run dev时,就会死在运行中.......node build/dev-server.js ,卡着不动。
你更新下 mpvue-entry 试试
更新了"mpvue-entry": "^1.1.7",问题依旧存在。
你调试下是卡在哪儿了?
给个 demo 也行
要不我传到github上看看
clone 你的仓库安装依赖后,dev 及 build 均正常
难道是环境问题?我是cnpm,node8.9
win7系统
小程序开发者工具中,是否显示缺少文件?
用 npm 试下
$ npm i npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
uglifyjs-webpack-plugin@0.4.6 postinstall F:\wxapp\node_modules\webpack\node_modules\uglifyjs-webpack-plugin node lib/post_install.js
npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN vue-loader@13.7.1 requires a peer of vue-template-compiler@^2.0.0 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
added 1103 packages in 91.05s
问题依旧
你用官方模板创建个项目看有问题没
官方模板,用main.js,没用路由时,正常。
你配置 mpvue-entry 后就会出问题?
应该就是mpvue-entry对win的支持度出问题。增加路由,删除后,依旧还会有删除的文件路径存在,在工具只打开,还会找已经删除的文件。
我的 win10 是没问题的,你查看下 app.json ,路由删除后应该是会更新的
问题已解决,原因.vue文件,如果没有 export default {} 则路由会出问题,并run dev时会卡着不动。
这个去 mpvue 提一下吧
增加路由后,再npm run build 或者 dev ,会一直死在building for production...这条命令行中,不动。