npm install errors with Error: ENOENT, chmod
Ok it looks like NPM is using your .gitignore
as a base for the .npmignore
file, and thus ignores /lib
. If you add a blank .npmignore
file into the root of your application, everything should work.
A better, more explicit approach is to use an allow-list rather than a disallow-list, and use the "files" field in package.json to specify the files in your package.
[edit] - more info on this behaviour here: https://docs.npmjs.com/cli/v7/using-npm/developers#keeping-files-out-of-your-package
What could cause an error related to npm not being able to find a file? No contents in my node_modules subfolder. Why is that?
It might be related to corruption in Angular Packages or incompatibility of packages.
Please follow the below steps to solve the issue.
- Delete node_modules folder manually.
- Install Node ( https://nodejs.org/en/download ).
- Install Yarn ( https://yarnpkg.com/en/docs/install ).
- Open command prompt , go to path angular folder and run Yarn.
- Run angular\nswag\refresh.bat.
- Run npm start from the angular folder.
Update
ASP.NET Boilerplate suggests here to use yarn because npm has some problems. It is slow and can not consistently resolve dependencies, yarn solves those problems and it is compatible to npm as well.
`npm install` Returns an errors
Create a file name .typingsrc
in your user directory
C:\Users\morwin
- for example
That contain :
{
"rejectUnauthorized": false,
"registryURL": "http://api.typings.org/"
}
that's all
it works now !
Unable to resolve dependency tree error when installing npm packages
This is not related to an HTTP proxy.
You have dependency conflict (incorrect and potentially broken dependency) as it says, so try to run the command with --force
, or --legacy-peer-deps
. If it doesn't take effect, the temporary solution is using prior versions of the Node.js (downgrading the Node.js version) as it causes this kind of errors to happen sometimes.
Update based on the OP's update:
As you see, it fires the following error:
No matching version found for @angular/http@^9.1.4.
Take a look at angular/http
page. Note that the latest version for that deprecated package is 7.2.16
while you request an upper version (e.g., ^9.1.4
)! So, try to check the project dependencies and follow the raised errors in order to solve the problem.
npm install error though Python already included
The build fails because you are using Windows instead of Linux.
This is clearly stated in the installation instructions you claim to have followed.
notes
The build tasks rely on Linux shell commands such as pkill and rsync
so are unlikely to run on other OS's without some tweaks.
If you want to run this under windows, you should ask the repo maintainer for guidance.
npm install resulting in 'ENOENT: no such file or directory'
As already pointed out by Subburaj this is because you are missing a package.json
.
Just run npm init
to initialize that file for you; afterwards it should work.
Related Topics
How to Get the Coordinates of a Mouse Click on a Canvas Element
Pad a Number With Leading Zeros in JavaScript
Sleep in JavaScript - Delay Between Actions
Persistent Service Worker in Chrome Extension
No Visible Cause For "Unexpected Token Illegal"
Group Array of Object Nesting Some of the Keys With Specific Names
Sum JavaScript Object Propertya Values With the Same Object Propertyb in an Array of Objects
Static Variables in JavaScript
How to Detect Internet Speed in JavaScript
How to Invoke a Jsf Managed Bean on a HTML Dom Event Using Native JavaScript
Create a Date With a Set Timezone Without Using a String Representation