Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I got an error when installing protobufjs with this command:
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?
–
Where 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 command with or without the part in square brackets.
For npm you can run:
npm install protobufjs
npm install protobufjs --save-prod
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 commit this file.
+ protobufjs@6.8.8
added 14 packages from 35 contributors and audited 16 packages in 4.502s
found 0 vulnerabilities
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
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.