F-loat / ithome-lite

🥛 IT之家第三方小程序版客户端(使用 mpvue 开发,兼容 web)
MIT License
527 stars 112 forks source link

building for production... #13

Closed umphp closed 6 years ago

umphp commented 6 years ago

增加路由后,再npm run build 或者 dev ,会一直死在building for production...这条命令行中,不动。

umphp commented 6 years ago

dev就是停留在 node build/dev-server.js

F-loat commented 6 years ago

重新安装依赖试试

LOWINC commented 6 years ago

"mpvue-loader": "1.0.12" 试下

umphp commented 6 years ago

重新安装依赖,及换"mpvue-loader": "1.0.12" 后重新安装,问题如故。

umphp commented 6 years ago

eslint --ext .js,.vue src 也没有语法错误

F-loat commented 6 years ago

增加了路由具体是做了什么

umphp commented 6 years ago

例如:先加一个路由 /pages/a/b ,然后有时正常开发者工具里就能看到新加的页面b, 如若不正常时,工具能提示/pages/a/b文件找不着,删除 /pages/a/b后,再建个 /pages/a/c,结果看到的,还是提示 /pages/a/b找不着。 再次npm run dev时,就会死在运行中.......node build/dev-server.js ,卡着不动。

F-loat commented 6 years ago

你更新下 mpvue-entry 试试

umphp commented 6 years ago

更新了"mpvue-entry": "^1.1.7",问题依旧存在。

F-loat commented 6 years ago

你调试下是卡在哪儿了?

F-loat commented 6 years ago

给个 demo 也行

umphp commented 6 years ago

要不我传到github上看看

umphp commented 6 years ago

https://github.com/umphp/wxappex

F-loat commented 6 years ago

clone 你的仓库安装依赖后,dev 及 build 均正常

umphp commented 6 years ago

难道是环境问题?我是cnpm,node8.9

umphp commented 6 years ago

win7系统

umphp commented 6 years ago

小程序开发者工具中,是否显示缺少文件?

F-loat commented 6 years ago

用 npm 试下

umphp commented 6 years ago

$ 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

umphp commented 6 years ago

问题依旧

F-loat commented 6 years ago

你用官方模板创建个项目看有问题没

umphp commented 6 years ago

官方模板,用main.js,没用路由时,正常。

F-loat commented 6 years ago

你配置 mpvue-entry 后就会出问题?

umphp commented 6 years ago

应该就是mpvue-entry对win的支持度出问题。增加路由,删除后,依旧还会有删除的文件路径存在,在工具只打开,还会找已经删除的文件。

F-loat commented 6 years ago

我的 win10 是没问题的,你查看下 app.json ,路由删除后应该是会更新的

umphp commented 6 years ago

问题已解决,原因.vue文件,如果没有 export default {} 则路由会出问题,并run dev时会卡着不动。

F-loat commented 6 years ago

这个去 mpvue 提一下吧