Trying to set up Angular application for the first time - node.js

I am having issues trying to get an angular framework setup to start a new project, and having some challenges. I installed node.js and as you can see I have v14.17.1 installed. when I try the command npm -g #angular/cli i get some errors that I don't know how to fix. Not sure what my next steps should be to help get this working. thanks.
C:\Users***\Documents\Codding\Angular>node -v v14.17.1
C:\Users*\Documents\Codding\Angular>npm -g #angular/cli npm ERR!
code ENOENT npm ERR! syscall open npm ERR! path
C:\Users*\Documents\Codding\Angular/package.json npm ERR! errno
-4058 npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users***\Documents\Codding\Angular\package.json' npm ERR! enoent
This is related to npm not being able to find a file. npm ERR! enoent
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users***\AppData\Local\npm-cache_logs\2021-06-23T11_15_18_924Z-debug.log
cmd promt errors

You have left out the "install" part of the npm command.
Try
npm install -g #angular/cli
Then, once that finishes, you can verify by running
ng version

Related

I am trying to create a react app but it gives this error

$ npx create-react-app my-app
npm ERR! code ENOENT
npm ERR! syscall spawn C:\MongoDb\mongosh-1.0.1-win32-x64\mongosh-1.0.1-win32-x64\bin
npm ERR! path C:\Arya\web development\react-project-first
npm ERR! errno -4058
npm ERR! enoent spawn C:\MongoDb\mongosh-1.0.1-win32-x64\mongosh-1.0.1-win32-x64\bin ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\yoges\AppData\Local\npm-cache\_logs\2021-08-20T17_12_07_619Z-debug.log
My node and npm versions are up to date.
I tried reinstalling npm and tried installing a module to make sure it is working but it's showing the same error.
And in my package.json when I click debug this is what it shows:
Can someone tell me what to do?
you should uninstall it.
npm uninstall -g create-react-app.
and then try again, it happens sometimes if you have an old version installed.
Never mind, it started working again. The path of the ComSpec was changed for some reason and also in the environment variables the MongoDB was messing so had to delete that too.

npm not installing packages on WSL

I keep running into an issue with npm not installing packages.
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path /mnt/c/Users/zhelf/downloads/test/node_modules/ansi-regex
npm ERR! dest /mnt/c/Users/zhelf/downloads/test/node_modules/.ansi-regex.DELETE
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, rename '/mnt/c/Users/zhelf/downloads/test/node_modules/ansi-regex' -> '/mnt/c/Users/zhelf/downloads/test/node_modules/.ansi-regex.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/zhelf/.npm/_logs/2020-08-05T16_06_33_155Z-debug.log
this is the error it keeps giving me I am running windows 10 with WSL and ubuntu 20.04 I have tried through the regular terminal and the terminal in vscode as well. I have tried googling the problem have cleared the npm cache and I get the same problem I was trying to install express but tried other packages as well and I keep getting the same error.
Ok, I found the issue I needed to run the npm install -g build-tools, and package install it again.

How to fix npm start errors

I just downloaded a dashboard that uses react.js modules so when get to the dashboards source folder and try to run the command 'npm start' I get the error below:
I tried the following commands but it couldn't work
sudo npm -g uninstall node
npm install node
npm cache clean
sudo npm install -g npm
npm install
npm start
npm ERR! path /home/lamechd/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/home/lamechd/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/lamechd/.npm/_logs/2019-06-04T09_51_23_106Z-debug.log
NB/ Iam using manjaro Operating System based on archlinux

npm install firebase fails

I'm trying to install firebase ^5.5.0 on my local environment (vagrant/virtualbox with ubuntu 16.0.4 and the newest npm and nodejs)
When I run npm install I get this error:
npm ERR! path
/code/node_modules/grpc/node_modules/mkdirp/node_modules/minimist/package.json.789167206
npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall open npm ERR!
enoent ENOENT: no such file or directory, open
'/code/node_modules/grpc/node_modules/mkdirp/node_modules/minimist/package.json.789167206'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in: npm ERR!
/home/vagrant/.npm/_logs/2018-09-19T09_14_46_808Z-debug.log
The logs or verbose don't tell me anything other than this. How can I solve this?
I did what #Carlo I deleted the package-lock.json and ran npm install, after auditing all the package I ran npm install firebase prior to funding and some audit fixes.
Maybe after funding or fixing some audits it may have been incompatible with installing firebase.

npm install of Next.js from github fails

When trying to npm install zeit/nextjs from Github directly it fails with the following exception.
I get the same error both when running in a docker instance and directly in osx, and both on Node 5.2 and 7.2. First time I'm installing directly from GitHUB, so I don't know if I'm missing something important?
edit
npm install next
works as expected, but does not contain the latest package.json that is needed for Docker
end edit
Regards
Mattias
root#2cc7a4204924:/usr/src# npm install git+https://github.com/zeit/next.js
.
.
.
.... lots of other packages installing fine .....
.
.
.
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "git+https://github.com/zeit/next.js"
npm ERR! node v7.2.0
npm ERR! npm v3.10.9
npm ERR! path /usr/src/node_modules/next/dist/bin/next
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/src/node_modules/next/dist/bin/next'
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/src/node_modules/next/dist/bin/next'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /usr/src/npm-debug.log
Not sure why it doesn't work from github but you can do this to install the latest beta from npm:
npm i --save next#^2.0.0-beta
Installing the package by name installs it just fine but through github it throws errors. It must be a problem with the current version at Github.
npm i next // works
npm i zeit/next.js // doesn't work

Resources