admin管理员组文章数量:1279245
I got an error when installing protobufjs with this mand:
npm install protobufjs [--save --save-prefix=~]
the error is:
npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name "[--save": Tags may not have any characters that encodeURIComponent encodes.
How can I fix this issue?
I got an error when installing protobufjs with this mand:
npm install protobufjs [--save --save-prefix=~]
the error is:
npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name "[--save": Tags may not have any characters that encodeURIComponent encodes.
How can I fix this issue?
Share Improve this question edited Nov 27, 2018 at 7:31 Wodin 3,5382 gold badges28 silver badges58 bronze badges asked Nov 27, 2018 at 4:40 Fx Bayu Yunianto PabisaFx Bayu Yunianto Pabisa 671 gold badge2 silver badges4 bronze badges 2- The problem has to do with npm and not protobuf, so I removed the protobuf tag. I fixed the formatting of the mand and the error and also added some more context to the error. – Wodin Commented Nov 27, 2018 at 7:31
-
try
npm install protobufjs --save
– Sahith Vibudhi Commented Nov 27, 2018 at 8:11
3 Answers
Reset to default 4Where did you find that syntax?
Square brackets in the instructions for how to run something generally mean that the part in square brackets is optional. i.e. that you can run the mand with or without the part in square brackets.
For npm you can run:
npm install protobufjs
or
npm install protobufjs --save-prod
or
npm install protobufjs --save-dev
etc., depending on what you're trying to do.
I believe older versions of npm used --save
instead of --save-prod
and in later versions of npm, --save-prod
is the default.
$ npm --version
6.4.1
$ npm install protobufjs
npm notice created a lockfile as package-lock.json. You should mit this file.
+ [email protected]
added 14 packages from 35 contributors and audited 16 packages in 4.502s
found 0 vulnerabilities
Just simply use the following Syntax #nodejs
#Express
npm install protobufjs
Insted of :
npm install protobufjs --save-prod
or
npm install protobufjs --save
Because the newer version of Nodejs
by default having --save
method
As best answer says:
prefix=~]
that's the problm
in my case was just a + for this line:
npm install --save request request-promise cheerio puppeteer+
copy-pasting from website, make me do this mistake
hope it works
本文标签: javascriptnpm error code EINVALIDTAGNAME when trying to install protobufjsStack Overflow
版权声明:本文标题:javascript - npm error code EINVALIDTAGNAME when trying to install protobufjs - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741216175a2360085.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论