What is the meaning of EINVALIDTAGNAME in simple terms?

I'm currently experimenting with a tutorial for setting up a basic Discord bot that was designed for Windows users (I'm using a Mac). I don't have much experience and every time I attempt to follow the last steps, I encounter the following error message. These steps are supposed to automatically download files into my bot folder.

npm ERR! code EINVALIDTAGNAME npm ERR! Invalid tag name "–save": Tags cannot include characters that encodeURIComponent encodes.

Answer №1

It seems like the source where you found the tutorial mistakenly changed --save (with two hyphens) to –save (with an en-dash). If you encounter instructions online that involve entering special characters in a terminal, it may have been altered by the platform used for publishing. Typically, if the input is a word, use --, and if it's a single letter, use -.

If you're working with a recent npm version, there's no need to include the --save option.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Difficulty Encountered in Rendering Component Using setTimeout Function

Having trouble figuring out why my component, enclosed in a setTimeout function, is not appearing on the DOM: const ContentMain = Component({ getInitialState() { return {rendered: false}; }, componentDidMount() { this.setStat ...

What is the best approach for Angular directives: utilizing a single object or separate values as attributes?

This question pertains to best practices, but I do believe there is a definitive answer. I have a directive that offers six customizable options. Should I assign each option to a separate attribute on the directive (as shown below): <my-directive my ...

Transferring data from ng-init to <script> in AngularJS

Take a look at this code snippet: <div ng-init="companyData"> <script type="text/javascript"> window.timeline = new TL.Timeline('timeline-embed', sampleJson); </script> </div> Is there a method to include company ...

Adjust the database table when a session expires in PHP

Within my PHP code, there is a session timeout feature that triggers after 60 minutes of inactivity. This code snippet resides in the file /mno.php, where both the login and logout functionalities are also implemented. /mno.php if (isset($_SESSION[' ...

Execute a separate function when clicking on certain buttons without interfering with the buttons' original onclick function (which has already been assigned) - JavaScript

While I am still relatively new to JavaScript and learning, I have developed a webpage with multiple buttons that trigger different functions on click events. However, I would like to additionally call another function when any of these buttons are clicked ...

The Use of File Object in Internet Explorer Version 10

My experience with using the html input type=file element to retrieve files using document.getelementbyid("..").files has been successful in Chrome and Firefox, but unfortunately, I am facing issues with Internet Explorer 10. Despite researching various bl ...

Changing the stroke color in between drawing on an HTML5 Canvas

I have been experimenting with a basic JavaScript snippet to showcase an unusual HTML5 canvas behavior I've encountered. Every 100ms, I am drawing the same set of strokes but in a different sequence. Strangely, some of the strokes change color interm ...

The issue with AngularJS multiple $http requests failing to fetch accurate data

I'm having issues with my AngularJS controller and service modules. I want to refresh custController.allCustomers after adding a new customer so that the UI displays the new data. However, when I call custController.createCustomer, the new customer do ...

How to pass arguments to the `find` method in MongoDB collections

I've been attempting to pass arguments from a function to the MongoDB collection find method. Here's what I have so far: async find() { try { return await db.collection('users').find.apply(null, arguments); } catch(err) { c ...

A fresh checkbox was added to the page using Jquery Switchery to disable it

I'm having trouble disabling the Switchery checkbox. When I try to disable it, another Switchery checkbox appears on the page along with the one I previously defined: <div class="form-group"> <label class="col-md-2"> ...

Tips for creating a dynamic system to continuously add more HTML tables in PHP

I am working with an HTML table where the data is retrieved from a database. I need to add new rows to enter additional data, but the numbering does not continue from the last number. My question is how can I increase the numbering in the table. Please ref ...

Using jQuery to Navigate through Different Routes in React Router

Hey there, I've managed to get my React-Router set up quite well but now I'm facing a new challenge. I need to implement some JavaScript functionality. For example: When the user enters their login details and clicks 'login', I want my ...

How can we prevent users from changing URLs or accessing pages directly in Angular 7 without using authguard?

Hey there! I am trying to find a way to prevent users from accessing different pages by changing the URL, like in this https://i.sstatic.net/E2e3S.png scenario. Is there a method that can redirect the user back to the same page without using Authguard or a ...

Creating a nested function and utilizing the return statement in JavaScript

I am facing an issue with my custom function that contains an ajax call. I need to retrieve a variable from the ajax function within my custom function, but I'm unable to do so. Why is this happening? Possible solution 1: <script> function ...

If I needed to include extra information within an element for easy retrieval using JavaScript

Using PHP, I have generated a list of products in a <select> element. Each product has a weight that I want to store within each <option> so I can access it later using Javascript. Is there a way to include the weight data directly in the HTML ...

looping through the iteration

Here is a link to my original plunker demonstration: http://plnkr.co/edit/9UBZ9E4uxAo1TXXghm1T?p=preview. In the case of div 4 (ng-if="show==4"), I am looking for a way to hide the particular div when the list is empty. Currently, each div is displayed fo ...

Challenges with the "//" syntax in UNIX

$('#lang_choice1').each(function () { var lang = $(this).val(); $('#lang_files').empty(); $.ajax({ type: "POST", url: '< ...

Loading Collada files with a progress callback function can help track the

Is there a proper way to incorporate a loading bar while using the ColladaLoader? The code indicates that the loader requires three parameters, with one being a progressCallback. progressCallback( { total: length, loaded: request.responseText.length } ); ...

"Encountering a npm ERR when attempting to install Bower on the

Having both node and nodenv successfully installed on my Ubuntu 16.04, I attempted to install bower. npm install -g bower Encountering the following error message: npm WARN deprecated [email protected]: ...psst! Your project can stop working at ...

Top-notch strategy for creating Node Package Manager packages that are interdependent

As we work on developing two React-based applications, let's call them app-a and app-b, we also manage two dependencies. One is a shared-components package, which contains components shared between the two applications, and the other is a shared-utili ...