errors with npm after purchasing a new computer
I have been trying to get npm up and running since purchasing a new computer. But I am getting a ton of errors when I try to install npm. I have npm installed globally. My old bootcamp created a js-generate command that creates a react js environment for you but when I try to install all the modules I need for it using npm install I get these errors and warnings. After seeing the errors I did try to install python 3 on my computer. The project is on a separate SSD from the boot drive so that might influence things. I installed python 3 on my boot drive.
1 answer
-
answered 2022-01-23 03:13
KyleRifqi
It looks like python isnt installed on your machine, you may have to install python to remove this error. You can get the latest version of python from the python website.
do you know?
how many words do you know
See also questions close to this topic
-
how to change prettier format for react native
my code formatting prettier didn't works well for react native, i don't understand where to config it but it works well with flutter
from this code
import { View, Text } from 'react-native' import React from 'react' export default function App() { return ( <View> <Text>Apps</Text> </View> ) }
it's formatted to this
import { View, Text } from 'react-native' import React from 'react' export default function App() { return ( < View > < Text > Apps < /Text> < /View> ) }
-
react-router-dom v6 params only numbers
I want add number regex in may param in react-router-dom v6. it work fin in v5 like it:
<Route path="list/:id(\d+)" element={<MyComponent/>} />
but it not work in v6.
-
How can I fixed my problem"FirebaseError: Firebase: Error (auth/invalid-api-key)."
My environment variable is ok. No comas and name mistakes but they given me error like "FirebaseError: Firebase: Error (auth/invalid-api-key)". How can I fixed it. Please Help me...
This my .env file
REACT_APP_apiKey=AIzaSyBWobnhbdeMdNpXXXXXXXXXXXXXXXXXXXX REACT_APP_authDomain=XXXXX.firebaseapp.com REACT_APP_projectId=XXXX REACT_APP_storageBucket=XXXXX.appspot.com REACT_APP_messagingSenderId=4997390XXXXX REACT_APP_appId=1:4997390XXXXX:web:cc7bc80aa1bdb78fXXXXXX REACT_APP_measurementId=G-M1XDXXXXXX
This my firebase config file
const firebaseConfig = { apiKey: process.env.REACT_APP_apiKey, authDomain: process.env.REACT_APP_authDomain, projectId: process.env.REACT_APP_projectId, storageBucket: process.env.REACT_APP_storageBucket, messagingSenderId: process.env.REACT_APP_messagingSenderId, appId: process.env.REACT_APP_appId, measurementId: process.env.REACT_APP_measurementId, }; when I debugging firebaseConfig object console.log(firebaseConfig.apiKey); ==========> undefined console.log(firebaseConfig.authDomain); ==========> undefined console.log(firebaseConfig.projectId); ==========> undefined console.log(firebaseConfig.storageBucket); ==========> undefined console.log(firebaseConfig.measurementId); ==========> undefined console.log(firebaseConfig.appId); ==========> undefined console.log(firebaseConfig.measurementId); ==========> undefined
client side given error this "FirebaseError: Firebase: Error (auth/invalid-api-key)"
-
how do I dissable debian python path/recursion limit
so, as of late, I've been having path length limit and recursion limit issues, so I really need to know how to disable these.
I can't even install modules like discord.py!!!!
-
TypeError: 'float' object cannot be interpreted as an integer on linspace
TypeError Traceback (most recent call last) d:\website\SpeechProcessForMachineLearning-master\SpeechProcessForMachineLearning-master\speech_process.ipynb Cell 15' in <cell line: 1>() -->1 plot_freq(signal, sample_rate) d:\website\SpeechProcessForMachineLearning-master\SpeechProcessForMachineLearning-master\speech_process.ipynb Cell 10' in plot_freq(signal, sample_rate, fft_size) 2 def plot_freq(signal, sample_rate, fft_size=512): 3 xf = np.fft.rfft(signal, fft_size) / fft_size ----> 4 freq = np.linspace(0, sample_rate/2, fft_size/2 + 1) 5 xfp = 20 * np.log10(np.clip(np.abs(xf), 1e-20, 1e100)) 6 plt.figure(figsize=(20, 5)) File <__array_function__ internals>:5, in linspace(*args, **kwargs) File ~\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\core\function_base.py:120, in linspace(start, stop, num, endpoint, retstep, dtype, axis) 23 @array_function_dispatch(_linspace_dispatcher) 24 def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, 25 axis=0): 26 """ 27 Return evenly spaced numbers over a specified interval. 28 (...) 118 119 """ --> 120 num = operator.index(num) 121 if num < 0: 122 raise ValueError("Number of samples, %s, must be non-negative." % num) TypeError: 'float' object cannot be interpreted as an integer
What solution about this problem?
-
IndexError: list index out of range with api
all_currencies = currency_api('latest', 'currencies') # {'eur': 'Euro', 'usd': 'United States dollar', ...} all_currencies.pop('brl') qtd_moedas = len(all_currencies) texto = f'{qtd_moedas} Moedas encontradas\n\n' moedas_importantes = ['usd', 'eur', 'gbp', 'chf', 'jpy', 'rub', 'aud', 'cad', 'ars'] while len(moedas_importantes) != 0: for codigo, moeda in all_currencies.items(): if codigo == moedas_importantes[0]: cotacao, data = currency_api('latest', f'currencies/{codigo}/brl')['brl'], currency_api('latest', f'currencies/{codigo}/brl')['date'] texto += f'{moeda} ({codigo.upper()}) = R$ {cotacao} [{data}]\n' moedas_importantes.remove(codigo) if len(moedas_importantes) == 0: break # WITHOUT THIS LINE, GIVES ERROR
Why am I getting this error? the list actually runs out of elements, but the code only works with the if
-
I would like the header logo and main visual to be aligned vertically
Prerequisites
The header logo and main visual are side by side.
Expected value
I want the header logo and main visual to be aligned vertically.I would like to do something like this URL.
Reproduction procedure
Run the code below.
body { height: 1295.83px;; width: 1263px; display: flex; justify-content: center; } .header__container { height: 17.83px; width: 1000px; font-size: 14px; font-family: Meiryo; margin: 60px 0px 0px; .header__logo { height: 17.83px; width: 160px; } } .container__main { height: 1295.83px; width: 1263px; main { height: 1118px; width: 1000px; .main__mainvisual { height: 400px; width: 1000px; } } }
<!DOCTYPE html> <html lang="ja"> <body> <header class="header__container"> <img class="header__logo" src="image/logo.svg" alt="PHOTO BOOK"> </header> <div class="container__main"> <main> <img class="main__mainvisual" src="image/mainvisual.jpg" alt="メインビジュアル"> </main> </div> </body> </html>
-
MUI/Icon makes everything dissapear
When I try to import and use a mui icon in react, it makes the whole div dissapear, and just the background image remain, i have installed: emotion/react, emotion/styled, mui/icons-material, mui/material, styled-components, mui/styled-engine-sc
<div className="login"> <h1>Login</h1> <div className="form"> <EmailIcon className='icon'/> <input type="text" placeholder="Email"></input> <input type="password" placeholder='Password'></input> </div> <div className="buttons"> <button id='login'>Login</button> <button id='register'>Register</button> </div> </div> )
-
Media-queries not working on Sass project
I am working on a Sass project and everything worked properly, but media queries are not working. I tried adding them at the bottom of the document, adding in the chain of labels, having more specificity than the normal chain and nothing is working. Do you know what the problem could it be?
Here is what I did:
Breakpoints:
$mobile-breakpoint: 600px; $laptop-breakpoint: 922px;
In this case is applying the media query even when the width is less than 922px:
img{ height: 5vw; margin: 3vh 4vh 4.6vh 3vh; @media(min-width: $laptop-breakpoint){ height: 4vw; } }
The code after being coverted to CSS:
.main-header .header-logo-search a img { height: 5vw; margin: 3vh 4vh 4.6vh 3vh; } @media (min-width: 922px) { .main-header .header-logo-search a img { height: 4vw; } }
In this case, it does not apply the media query:
input{ @include search(); width: 30vw; box-sizing: border-box; padding: 0 1.5vw; font-size: 1.2rem; background-color: $snow; border-radius: 5px 0 0 5px; @media(max-width: 600px){ display: none; }
The code after being coverted to CSS:
.main-header .header-logo-search form input { height: 3.5rem; line-height: 3.5rem; border: none; margin: auto 0; width: 30vw; box-sizing: border-box; padding: 0 1.5vw; font-size: 1.2rem; background-color: #FFF9FB; border-radius: 5px 0 0 5px; } @media (max-width: 600px) { .main-header .header-logo-search form input { display: none; } }
Thanks in advance
-
npm shows vulnerabilities when installing firebase tools
- I already installed node js and when I try to run npm install -g firebase-tools, it shows me this error, and it says run npm audit fix
[#########.........] | reify:setimmediate: timing reifyNode:node_modules/firebase-tools/node_modules/@gar/pronpm WARN deprecated har-validator@5.1.3: this library is no longer supported npm WARN deprecated debug@4.1.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
changed 637 packages, and audited 638 packages in 59s
34 packages are looking for funding run
npm fund
for details21 vulnerabilities (15 moderate, 6 high)
To address all issues, run: npm audit fix
Run
npm audit
for details.- This is the result when I run npm audit fix
up to date, audited 1 package in 456ms
found 0 vulnerabilities
-
How to debug npm ERR! errno -4094?
I'm doing my first React project, and following the MOOC instructions, I've had to create routes by this command : npm install react-router-dom
Then the console return me these errors :
I tried to :
- do it with my IDE closed,
- the project was not running,
- in different command prompt
Thank you
-
I face gyp error when installing truffle in Windows 11,using node js 14.17.6,vs 1.66.2,npm 8.9.0,python 3.9.6
I face gyp error when installing truffle in Windows 11 using cmd and giving command npm install -g truffle