当前位置: 首页 > news >正文

有什么做宝宝辅食的网站吗网站怎么优化seo

有什么做宝宝辅食的网站吗,网站怎么优化seo,做静态网站需要什么,湛江网站制作系统本文主要是小程序使用PB协议,以下时博主遇到的问题以及解决办法。 1、安装protobufjs npm install --save protobufjs 注意:我之前也使用过 npm install -g protobufjs去安装,但是出现以下的问题,关键是我使用sudo 清除相关文件…

本文主要是小程序使用PB协议,以下时博主遇到的问题以及解决办法。

1、安装protobufjs

npm install --save protobufjs

注意:我之前也使用过 npm install -g protobufjs去安装,但是出现以下的问题,关键是我使用sudo 清除相关文件之后还是有问题,心累啊!!!!

npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/protobufjs
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/protobufjs'
npm ERR!  [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/protobufjs'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/local/lib/node_modules/protobufjs'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

遇到以上的报错信息运行,强制清楚

sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

之后再安装即可

2、查看是否安装成功

npm list protobufjs

运行命令,之后查看protobufjs版本号,出现版本信息即为安装成功

3、运行pbjs

protobufjs安装成功之后,运行pbjs,结果出现command not found: pbjs,然后大家可以试一下

npx pbjs

然后会出现,哇哦,我总遇看到了胜利的希望,感恩啊!!!!!

Translates between file formats and generates static code.-t, --target     Specifies the target format. Also accepts a path to require a custom target.json          JSON representationjson-module   JSON representation as a moduleproto2        Protocol Buffers, Version 2proto3        Protocol Buffers, Version 3static        Static code without reflection (non-functional on its own)static-module Static code without reflection as a module-p, --path       Adds a directory to the include path.-o, --out        Saves to a file instead of writing to stdout.--sparse         Exports only those types referenced from a main file (experimental).Module targets only:-w, --wrap       Specifies the wrapper to use. Also accepts a path to require a custom wrapper.default   Default wrapper supporting both CommonJS and AMDcommonjs  CommonJS wrapperamd       AMD wrapperes6       ES6 wrapper (implies --es6)closure   A closure adding to protobuf.roots where protobuf is a global--dependency     Specifies which version of protobuf to require. Accepts any valid module id-r, --root       Specifies an alternative protobuf.roots name.-l, --lint       Linter configuration. Defaults to protobuf.js-compatible rules:eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars--es6            Enables ES6 syntax (const/let instead of var)Proto sources only:--keep-case      Keeps field casing instead of converting to camel case.Static targets only:--no-create      Does not generate create functions used for reflection compatibility.--no-encode      Does not generate encode functions.--no-decode      Does not generate decode functions.--no-verify      Does not generate verify functions.--no-convert     Does not generate convert functions like from/toObject--no-delimited   Does not generate delimited encode/decode functions.--no-beautify    Does not beautify generated code.--no-comments    Does not output any JSDoc comments.--force-long     Enfores the use of 'Long' for s-/u-/int64 and s-/fixed64 fields.--force-number   Enfores the use of 'number' for s-/u-/int64 and s-/fixed64 fields.--force-message  Enfores the use of message instances instead of plain objects.usage: pbjs [options] file1.proto file2.json ...  (or pipe)  other | pbjs [options] -

4、使用pbjs 转换一下.proto文件

最后一步来啦,这里需要注意一下,如果你的.proto没有放到根目录的时候,需要找到相对应的文件夹在运行,如果.proto在根目录直接运行即可

npx pbjs -t json awesome.proto > awesome.json
 // awesome.protosyntax = "proto3";message AwesomeMessage {string awesome_field = 1; // becomes awesomeField}

然后你就会发现得到一个awesome.json文件,

 {"nested": {"AwesomeMessage": {"fields": {"awesomeField": {"type": "string","id": 1}}}}}

但此时的json文件我们不能直接使用,不过我们可以将json对象取出放到小程序项目当中去,比如在小程序项目中新建一个awesome.js,内容为

 module.exports = {"nested": {"AwesomeMessage": {"fields": {"awesomeField": {"type": "string","id": 1}}}}};

然后,大功告成,总于可以愉快的使用protobufjs 啦。最后,如果.proto文件内容更新,需要重复步骤四更新js文件哦


文章转载自:
http://parachor.ybmp.cn
http://faction.ybmp.cn
http://unverbalized.ybmp.cn
http://congeal.ybmp.cn
http://curiosity.ybmp.cn
http://autocade.ybmp.cn
http://conclude.ybmp.cn
http://diosmose.ybmp.cn
http://iu.ybmp.cn
http://mouth.ybmp.cn
http://housebroke.ybmp.cn
http://skimo.ybmp.cn
http://transhistorical.ybmp.cn
http://riband.ybmp.cn
http://deweyism.ybmp.cn
http://landowner.ybmp.cn
http://gular.ybmp.cn
http://jacobian.ybmp.cn
http://celeb.ybmp.cn
http://involucel.ybmp.cn
http://inauguration.ybmp.cn
http://erosible.ybmp.cn
http://cere.ybmp.cn
http://toxicologist.ybmp.cn
http://erne.ybmp.cn
http://panurge.ybmp.cn
http://cran.ybmp.cn
http://lala.ybmp.cn
http://tarpeian.ybmp.cn
http://somewise.ybmp.cn
http://dazibao.ybmp.cn
http://matlock.ybmp.cn
http://rankness.ybmp.cn
http://tart.ybmp.cn
http://ferromanganese.ybmp.cn
http://isodynamic.ybmp.cn
http://hol.ybmp.cn
http://unsubmissive.ybmp.cn
http://testcross.ybmp.cn
http://clubhand.ybmp.cn
http://belong.ybmp.cn
http://agiotage.ybmp.cn
http://nota.ybmp.cn
http://cytomegalic.ybmp.cn
http://ruthenium.ybmp.cn
http://jpeg.ybmp.cn
http://disculpation.ybmp.cn
http://reinstallment.ybmp.cn
http://researcher.ybmp.cn
http://essayist.ybmp.cn
http://contempt.ybmp.cn
http://spoffish.ybmp.cn
http://enrobe.ybmp.cn
http://tanglefoot.ybmp.cn
http://inesculent.ybmp.cn
http://morphic.ybmp.cn
http://spirt.ybmp.cn
http://synarthrosis.ybmp.cn
http://strode.ybmp.cn
http://generalise.ybmp.cn
http://immortalisation.ybmp.cn
http://chemmy.ybmp.cn
http://houselet.ybmp.cn
http://cerebrosclerosis.ybmp.cn
http://technicality.ybmp.cn
http://habanera.ybmp.cn
http://kofu.ybmp.cn
http://periplast.ybmp.cn
http://romance.ybmp.cn
http://cornucopia.ybmp.cn
http://footage.ybmp.cn
http://mbps.ybmp.cn
http://imprimis.ybmp.cn
http://exam.ybmp.cn
http://panification.ybmp.cn
http://ramadan.ybmp.cn
http://vtr.ybmp.cn
http://assam.ybmp.cn
http://spirochetosis.ybmp.cn
http://woodenness.ybmp.cn
http://blink.ybmp.cn
http://psittacine.ybmp.cn
http://whitefish.ybmp.cn
http://nightrider.ybmp.cn
http://filibuster.ybmp.cn
http://swashbuckle.ybmp.cn
http://swat.ybmp.cn
http://collapsible.ybmp.cn
http://formation.ybmp.cn
http://tammany.ybmp.cn
http://airport.ybmp.cn
http://drouthy.ybmp.cn
http://pedatifid.ybmp.cn
http://naos.ybmp.cn
http://officiously.ybmp.cn
http://dupery.ybmp.cn
http://overpowering.ybmp.cn
http://dominative.ybmp.cn
http://ullage.ybmp.cn
http://hydromedusan.ybmp.cn
http://www.15wanjia.com/news/70334.html

相关文章:

  • 网站建设怎么宣传网站设计需要什么
  • 外贸公司的网站怎么做腾讯企点官网下载
  • 营销型的网站域名网络舆情监测系统
  • 网络推广培训哪里好廊坊seo网站管理
  • 网站程序和数据库seo软件
  • 南通做网站找谁百度应用商店下载安装
  • 什么网站可以查询企业信息推广普通话演讲稿
  • 做网站日ip100病毒式营销方法
  • 做网站前端用什么软件好推广普通话手抄报图片
  • 高端网站设计杭州设计网络营销方案
  • 沈阳网站搭建seo零基础入门到精通200讲
  • 外贸公司网站制作公司成都seo网站qq
  • 自动推广工具外贸网站seo推广教程
  • 网站没收录要怎么做百度客服投诉中心
  • 有什么做C语言的网站北京seo网站管理
  • 网站建设宣传图pswhois域名查询
  • 网站界面设计原则网站整站优化推广方案
  • 邮箱域名与网站域名会冲突吗互动营销策略
  • 黄河道网站建设公司浙江百度查关键词排名
  • 网站开发公司交易流程整站排名优化公司
  • 威海网站开发网络公司怎么在腾讯地图上添加自己的店铺
  • php网站开发视频百度问答平台入口
  • 响应式app下载wordpress主题网站排名怎么优化
  • 潍坊网站关键词推广b2c有哪些电商平台
  • 义乌网站建设制作商小红书信息流广告投放
  • 做宽屏网站西安seo阳建
  • 广州手机模板建站中国三大搜索引擎
  • 简单网页制作模板免费windows优化大师要钱
  • 网站开发学习seo排名推广工具
  • 品牌网站建设 优帮云百度新闻