npm install dev 报错,只是语法问题还是同npm版本有关?

安装报错 · yappy2000 · 于 6年前 发布 · 3105 次阅读
ERROR in ./~/vue-loader/lib/template-compiler.js?id=data-v-51d839b0!./~/vue-loader/lib/selector.js?type=template&index=0!./src/views/body/product/Index.vue
template syntax error value="{{product_id}}": Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of <div id="{{ val }}">, use <div :id="val">.

ERROR in ./~/vue-loader/lib/template-compiler.js?id=data-v-51d839b0!./~/vue-loader/lib/selector.js?type=template&index=0!./src/views/body/product/Index.vue
template syntax error value="{{product.sku}}": Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of <div id="{{ val }}">, use <div :id="val">.

ERROR in ./~/vue-loader/lib/template-compiler.js?id=data-v-ec5a7ee8!./~/vue-loader/lib/selector.js?type=template&index=0!./src/views/body/customer/Productfavorite.vue
template syntax error tag <b> has no matching end tag.

ERROR in ./~/vue-loader/lib/template-compiler.js?id=data-v-15b2c1a2!./~/vue-loader/lib/selector.js?type=template&index=0!./src/views/body/customer/Contacts.vue
template syntax error tag <a> has no matching end tag.

npm install dev 报错,只是语法问题还是同npm版本有关?

共收到 10 条回复
Fecmall#16年前 1 个赞

处理了,已经提交,你用git 重新下载下来试试

[root@iZ942k2d5ezZ vue_fecshop_appserver]# npm run dev

> vuedemo@1.0.0 dev /www/web/develop/vue_fecshop_appserver
> node build/dev-server.js

Listening at http://localhost:8080

webpack built aa878f8e850f444c90cf in 23416ms
Hash: aa878f8e850f444c90cf
Version: webpack 1.15.0
Time: 23416ms
                                            Asset       Size  Chunks             Chunk Names
 static/fonts/font_1433401008_2229297.9d781c9.ttf    16.9 kB          [emitted]  
static/fonts/font_1433401008_2229297.f42d093.woff    10.9 kB          [emitted]  
   static/img/font_1433401008_2229297.a925510.svg    22.6 kB          [emitted]  
                       static/img/tag.64db760.png    10.2 kB          [emitted]  
                                           app.js     5.1 MB       0  [emitted]  app
                                       index.html  704 bytes          [emitted]  
Child html-webpack-plugin for "index.html":
         Asset     Size  Chunks       Chunk Names
    index.html  1.47 MB       0       
webpack: Compiled successfully.
yappy2000#26年前 0 个赞

已解决,

git pull 
cnpm install
Fecmall#36年前 0 个赞

@yappy2000 #2楼 配置看看,会出啥问题,有问题就过来发帖

yappy2000#46年前 0 个赞

@Terry [[[[#3楼](#comment3)](#comment3)](#comment3)](#comment3) 嗯, vue.js国际化 是不是没生效?HTML没翻译过来?

  <h1 class='title'>{{ $t("message.cart") }}</h1>

语言配置是在哪配置吗? chrome控制台中打印: * [vue-i18n] Cannot translate the value of keypath 'message.cart'. Use the value of keypath as default.

Fecmall#56年前 0 个赞

@yappy2000 #4楼 那个url,发下

Fecmall#66年前 0 个赞

@yappy2000 #4楼 翻译文件: https://github.com/fecshop/vue_fecshop_appserver/blob/master/src/config/languages/

国际化是生效的,访问这个页面:http://demo.fancyecommerce.com/#/

然后在底部 language下拉条切换成中文就可以了

yappy2000#76年前 0 个赞

@Terry #6楼 页面没做跳转,切换JS报错如下

[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "currentLang"

found in

---> <VBottom> at /home/yappy/vagrant/ubuntu/php/front/fecshop/src/views/body/home/body/Bottom.vue
       <Index> at /home/yappy/vagrant/ubuntu/php/front/fecshop/src/views/body/home/Index.vue
         <App> at /home/yappy/vagrant/ubuntu/php/front/fecshop/src/App.vue
           <Root>
Fecmall#86年前 0 个赞

@yappy2000 #7楼 下午看一下。

yappy2000#106年前 0 个赞

@Terry [#9楼](#comment9) 不报警告了,前端请求数据和后端返回正常!感谢管理员!

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics