开发环境执行 npm run dev http://localhost:8080/# -->ok
线上环境执行,npm run build http://vue.fecshop.com/ error...
500 Internal Server Error
docker..
$ npm install npm WARN deprecated babel-preset-es2015@6.24.1: raised_hands Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update! npm WARN deprecated isparta-loader@2.0.0: Package is deprecated, use https://github.com/deepsweet/istanbul-instrumenter-loader npm WARN deprecated formatio@1.1.1: This package is unmaintained. Use instead npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN eslint-config-standard@6.2.1 requires a peer of eslint-plugin-promise@>=3.3.0 but none is installed. You must install peer dependencies yourself. npm WARN karma-sinon-chai@1.3.3 requires a peer of sinon@^2.1.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 1050 packages in 270.807s
NPM 5.6 Ubuntu
看不懂,报错截图描述清楚,发生报错的上下文描述清楚,出来的报错先百度搜索看看有没解决方案。
另外warn不是报错,帖子请用markdown整理好
http://www.fecshop.com/topic/624
这里要更改api url对应的域名,这个是prod环境的
https://github.com/fecshop/vue_fecshop_appserver/blob/master/config/prod.env.js
dev环境: https://github.com/fecshop/vue_fecshop_appserver/blob/master/config/dev.env.js
// 这个是 vue数据获取的api对应的域名。 API_ROOT: '"//fecshop.appserver.fancyecommerce.com"', // vue的域名 WEBSITE_ROOT: '"//demo.fancyecommerce.com"'
对于安装文档:https://github.com/fecshop/vue_fecshop_appserver
让其改成
API_ROOT: '"//appserver.fecshop.com"', WEBSITE_ROOT: '"http://vue.fecshop.com"'
如果你改了,那么你看看appserver端你是否配置了?是否配置成功?
总体来说大致2个可能:
1.你的vue没有配置api url
2.vue配置的api url,你在appserver端没有配置好,导致不能访问。
node build/build.js
Tip: Built files are meant to be served over an HTTP server. Opening index.html over file:// won't work.
⠋ building for production...cp: no such file or directory: static/* Hash: e277c9bfbd90fb209ee1 Version: webpack 1.15.0 Time: 34610ms
vue配置的api url,appserver端配置好
@wubuyun #4楼 看不懂,帮不上忙,自己处理吧。
想要得到帮助,多看几遍:http://www.fecshop.com/topic/624
3.1对于你遇到的问题,请将你的问题出现的上下文描述清楚,也就是,你执行了什么操作,产生的报错或者问题,譬如,你安装fecshop,按照文档第几步骤,执行了那些操作,前面几个操作步骤的结果(无论正确与否,都应该贴上来),报错的结果,将报错发生的场景上下文描述清楚,没有上下文,是很难诊断问题的。
3.2将错误描述清楚,尽量图文并茂,错误日志尽量完整的提交上来,信息越完整,越有利于解决问题,譬如一个xx报错,那么把围绕这个报错的类文件,以及配置文件的内容都贴上来,信息越多,terry也能更快的帮你诊断问题,如果信息太少,只能猜测的可能点,那么你自己来解决,这个看自己的能力了
我也出现了这样的错误,具体描述和排查情况 请看 ~http://www.fecshop.com/topic/1867
@wubuyun #4楼 我也是报这样的错误