"PulseTile-RA" cannot run. Is it an npm dependency issue? - npm

I wanted to experiment with this project based on react-admin:
https://github.com/PulseTile/PulseTile-RA
So I downloaded the code, run npm install and I got a lot of errors from NPM mainly axios version corrupted.
Example:
npm ERR! code EINTEGRITY
npm ERR! sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI= integrity checksum failed when using sha1: wanted sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI= but got sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g== sha1-/z8N4ue10YDnV62YAA8Qgbh7zqM=. (75833 bytes)
npm WARN tarball tarball data for js-yaml#3.13.1 (sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==) seems to be corrupted. Trying one more time.
npm ERR! code EINTEGRITY
npm ERR! sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ== integrity checksum failed when using sha512: wanted sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ== but got sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==. (74050 bytes)
npm WARN tar ENOENT: no such file or directory, open 'C:\nodejs\xxx\PulseTile-RA\node_modules\.staging\babel-plugin-transform-object-rest-spread-7e34a6f0\package.json'*
When I do npm start I get an error that react-scripts doesn't exist.
I tried workarounds for similar errors on stackoverflow but without success. And yet still, I cannot get it to run. I have latest NPM, node on windows 10.
Please advise on NPM issues as I think this is the source of this project issue of not starting.
Thank you

So technically, this has more to do with npm than the actual project.
In fact, this issue reported to the npm repository would help.
But here are some quick steps that should help:
Since you're in windows-10, it's advisable to run the "delete" commands within git bash.
Go to the project directory (root folder)
Delete the node_modules directory: rm -rf node_modules
Delete package-lock.json file:rm package-lock.json`
Clear the cache: npm cache clean --force
Run npm install --verbose
If it doesn't help, then please follow more instructions here

Related

I cannot install npm with node, any ideas? [duplicate]

I keep getting the same error message when trying to create a new angular project.
I tried to create a new angular project using Windows Powershell with the following commands:
ng new hello-world
-> Would you like to add angular routing? - Yes
-> Stylesheet format? - CSS
I obtained the error message below. I already tried to reinstall angular cli and I'm running Powershell using Administrator.
Installed versions:
Angular CLI: 8.0.6
Node: 10.16.0
OS: win32 x64
Error message:
npm WARN tarball data for tslint#~5.15.0 (sha512-6bIEujKR21/3nyeoX2uBnE8s+tMXCQXhqMmaIPJpHmXJoBJPTLcI7/VHRtUwMhnLVdwLqqY3zmd8Dxqa5CVdJA==) seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for jasmine-spec-reporter#~4.2.1 (sha512-FZBoZu7VE5nR7Nilzy+Np8KuVIOxF4oXDPDknehCYBDE080EnlPu0afdZNmpGDBRCUBv3mj5qgqCRmk6W/K8vg==) seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for acorn#^6.0.5 (sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==) seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for #angular/language-service#~8.0.3 (sha512-04XojOo9FJgEQE/rZafnaJQxPEU+//TSzTgpGoIVzCSMx+joCY/ZSSwJZPWxiHlOE57W/zX02ZY+TwcM81oTdw==) seems to be corrupted. Trying one more time.
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\konta\Desktop\Programming_files\Angular\hello-world\node_modules\.staging\#angular\platform-browser-447d0944\esm2015\animations\src\animation_builder.js'
npm ERR! path C:\Users\konta\Desktop\Programming_files\Angular\hello-world\node_modules\.staging\jasmine-spec-reporter-cbb15ffc\screenshot.gif
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\konta\Desktop\Programming_files\Angular\hello-world\node_modules\.staging\jasmine-spec-reporter-cbb15ffc\screenshot.gif'
npm ERR! { [Error: EPERM: operation not permitted, unlink 'C:\Users\konta\Desktop\Programming_files\Angular\hello-world\node_modules\.staging\jasmine-spec-reporter-cbb15ffc\screenshot.gif']
npm ERR! cause:
npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Users\konta\Desktop\Programming_files\Angular\hello-world\node_modules\.staging\jasmine-spec-reporter-cbb15ffc\screenshot.gif'
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path:
npm ERR! 'C:\\Users\\konta\\Desktop\\Programming_files\\Angular\\hello-world\\node_modules\\.staging\\jasmine-spec-reporter-cbb15ffc\\screenshot.gif' },
npm ERR! stack:
npm ERR! 'Error: EPERM: operation not permitted, unlink \'C:\\Users\\konta\\Desktop\\Programming_files\\Angular\\hello-world\\node_modules\\.staging\\jasmine-spec-reporter-cbb15ffc\\screenshot.gif\'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path:
npm ERR! 'C:\\Users\\konta\\Desktop\\Programming_files\\Angular\\hello-world\\node_modules\\.staging\\jasmine-spec-reporter-cbb15ffc\\screenshot.gif',
npm ERR! parent: 'hello-world' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm WARN tar EPERM: operation not permitted, lstat 'C:\Users\konta\Desktop\Programming_files\Angular\hello-world\node_modules\.staging\#angular\router-8388bfd5\esm2015\src\directives'
npm WARN tarball tarball data for typescript#3.4.4 (sha512-xt5RsIRCEaf6+j9AyOBgvVuAec0i92rgCaS3S+UVf5Z/vF2Hvtsw08wtUTJqp4djwznoAgjSxeCcU4r+CcDBJA==) seems to be corrupted. Trying one more time.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\konta\AppData\Roaming\npm-cache\_logs\2019-07-01T01_21_13_653Z-debug.log
Package install failed, see above.
I found the problem: My antivirus was somehow blocking the files without me knowing. It worked once I paused my antivirus during the installation.
In windows10 I disabled the windows defender / windows security ==> realtime protection and try again npm install command and it worked
1.
2.
3.
NOTE : Turn on the real time protection again after installation complete.
Restarting the machine worked for me.
I had this problem on MAC. I just added 'sudo' before the command and it worked.
sudo npm install -g parcel-bundler
I tried opening CMD with Run as Admisnistrator then run npm i and it worked for me
I'd just like to add a small little answer based on Qadir Hussain's answer.
If you disable "Realtime Protection" in Windows Security, you're going to leave your laptop or PC vulnerable to any viruses that may infect it when "Realtime Protection" is off. This may seem a bit impossible if you're only installing an NPM package, but some apps may have a hidden background process waiting for "Realtime Protection" to be disabled, and when it is, it could inject a virus.
That been said, there's still an option.
First things first, open Windows Security by typing "Windows Security" in the Start Menu and tap "Open".
After that, go to "Virus & Threat Protection".
Next, scroll down until you find "Manage Settings" under "Virus & Threat Protection Settings".
Then, scroll down until you see "Exclusions". Under "Exclusions" there's a link that says "Add or remove exclusions".
Once that's done, tap the button that says "Add an exclusion". Then tap "Folder" on the drop-down menu.
Choose the node_modules directory that is giving issues.
Last but not least, Allow administrative permissions.
Finally, exit Windows Security.
I wouldn't recommend excluding your entire Projects folder, as that will disable all scans for the directory.
Small disclaimer here, I'm only making this answer as a means of helping others without disabling "Realtime Protection". While I'm not encouraging this, this might help fix a common problem.
Have a good day. :)
For me, there are several possibilities:
Intercepted by anti-virus software, resulting in inoperability.
It is locked by IDE, resulting in inoperable.
The task is locked by npm running, resulting in inoperable.
Cancelling the npm start process and closing the terminal window (I use Hyper Terminal) worked for me (using Win 10).
I was then able to uninstall an npm package and install another.
I had visual studio code running. I turned it off and boom! worked for me!
To me, using Windows 10 the only thing that solved this problem was: exclude the node_modules folder, open Visual Studio Code in Admin mode in the project folder, and execute the following command:
npm install -g --unsafe-perm
For me the issue was with npm version I was using. I changed to a npm version which did not have the bug by using the below command:
npm install --global npm#8.3.1
I found this solution in a github issue:
Link to github issue
Hope it helps you like it did me!
was facing this problem and this is how it got solved :
-stoping the execution of the development server for both front-end and backend:
two things:
try admin.
make sure other processes does not occupying the folder/file
with me, it was not related to antivirus.
it appears that a process occupied this folder. in my case a node process occupied my node_modules folder.
i found it out by using process-explorer - i searched the path end found that a node process using this folder(even though I closed it! very common in windows), so i ended this process and then i did not got this error anymore.
I had the same issue What I have done wrong is I had set the npm registry to a local registry, without knowing that I faced this issue once I reset to globally using npm config set registry https://registry.npmjs.org/ error went away.
I tried everything above.
Deleting node_modules and re-installing did the trick for me.
This happened when I tried installing a new npm dependency, jest, with:
npm i --save-dev jest
I got it working by simply rerunning the command.

trouble installing an npm package

I'm trying to install react-navigation in a react-native app I'm working on and I keep getting this error....
Standard error:
npm ERR! code 128
npm ERR! Command failed: C:\John\Applications\cygwin\bin\git.EXE clone -q git://github.com/react-navigation/react-native-tab-view.git C:\Users\John\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-e11f65d1 --config core.longpaths=true
npm ERR! fatal: Invalid path '/cygdrive/c/Users/John/AppData/Roaming/npm-cache/_cacache/tmp/C:\Users\John\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-e11f65d1': No such file or directory
npm ERR!
I have no problem with other packages, and I have git and it works. I have npm and it works.
So far I've manually deleted cpm cache from C:\Users\John\AppData\Roaming\npm_cache. Ran npm i -g npm Deleted package-lock.json
But nothing is working. Any ideas?
Figured it out. For my case at least I have git installed via cygwin and have cygwin in my path. I guess for some reason this package doesn't like that?
But I uninstalled git from cygwin and then installed it the 'normal' way and then it worked.

NPM: ENOENT: no such file or directory, rename

I was using gulp on the project, then i decide to deleted all the dev dependencies to switch to webpack, but every time i try to install using npm is get this error:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, rename 'C:\Users\MiguelFrias\Desktop\Therabytes\node_modules\.staging\fsevents-e80c4ef4\node_modules\are-we-there-yet' -> 'C:\Users\MiguelFrias\Desktop\Therabytes\node_modules\.staging\are-we-there-yet-5db4c798'
npm ERR! path C:\Users\MiguelFrias\Desktop\Therabytes\node_modules\acorn
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\MiguelFrias\Desktop\Therabytes\node_modules\acorn' -> 'C:\Users\MiguelFrias\Desktop\Therabytes\node_modules\.acorn.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! C:\Users\MiguelFrias\AppData\Roaming\npm-cache\_logs\2018-04-04T11_54_23_587Z-debug.log
any idea what can be happening.
just delete package-lock.json file and then install packages, that's all you need and should be works
rm package-lock.json && npm i
When I got this error I looked for all running instances of node in my task manager (i use process explorer on windows) and close/kill all running instances of node. For me its often webstorm or vs code. After closing these programs and ensuring there is no running node process npm install works again.
cache verify command resolved the issue for me
npm cache verify
I remove node_modules and package_lock.json. Then, npm install and it works
Iam using
-node v15.5.0
-npm v6.14.10
Try this:
close "expo start"
remove "package-lock.json"
Try to install packages now
example: npm i #react-navigation/native
This will fix the issue.
The simplest fix for me was:
npm uninstall -g
Then:
npm install -g
The second line may give a hint on what's happening:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, rename 'C:\Users\MiguelFrias\Desktop\Therabytes\node_modules\.staging\fsevents-e80c4ef4\node_modules\are-we-there-yet' -> 'C:\Users\MiguelFrias\Desktop\Therabytes\node_modules\.staging\are-we-there-yet-5db4c798'
It looks like npm doesn't have enough permission on the folder you're trying to use.
You can try:
Delete the npm_modules again.
Open whatever editor/terminal you're using to npm install with admin permission.
I found a solution for the problem, apparently is some kinda problem with the last version of npm, i was using npm version 5.6.0 and i downgraded to npm version 5.3.0. This did work after all, after intall a couple packages i still get the same error.
ok change version of npm for the last version 5.8.0 now everything working just perfect, before was some kind of problem with atom that denied the permission the building process to install the dependencies of the package.
I just retried to run
npm install
and it succeeded
For me, package-lock.json was not created and script was failing before itself.
This fixed my issue:
- deleted my node_modules.
- npm cache clean
- opened cmd as administrator at the repository folder
- logged-in to the https://registry.npmjs.org/ using username and passoward as few of my components needed authentication to install.
- npm i
If you ever get this error, the hotfix is to follow these steps:
delete node-modules folder
run command npm cache clean --force
run command npm install
install the package again with npm install your-package-name
Actually the current package you are installing has some dependencies which is not being found my npm. So, before installing this package just perform the following command. (It will install all your listed dependencies mentioned in package.json file which are necesaary to run your application)
npm install
It works...!
For not to delete package-lock.json or node_modules every time, just add file ".npmrc" with content "package-lock=false", or add this string if file ".npmrc" already exists.
You can try by removing the package-lock.json with the command rm package-lock.json then you go to the Node.JS website you 'install it' by going to LTS then after your node is updated run npm install in your terminal and that worked for me.
Just update the node to the latest version.
It solved my problem.
I was running command in Ubuntu wsl and it wasn't working so i tried running in cmd prompt and it worked
Kindly check any package.json is open anywhere, then close it first then retry.
For me I just deleted both package-lock.json & node_modules folder. Now everything works great 😃
Another thing I've seen a lot on projects that have been around and gone through multiple contributors:
Double check to see if anyone on your team has simultaneously done a npm install and yarn.
The tell-tale sign is you'll see a package-lock.json (generated by npm) and yarn-lock.json (generated by yarn) in the same repo. This can cause side-effects from collisions in the node_modules folder.
You can try dumping that folder locally, establishing a package manager of choice for your project and instructing the whole team on best practices.
For me I had to sudo the npm install command. Don't know why... Don't want to know either.
sudo npm install --save-dev my_package
These steps work for me:
1. run "npm cache verify" or
2. remove node_modules and package-lock.json
and rerun command)
Sometimes it can be the fault of the package you are trying to install. If that package is a local package and has a node_modules folder. Try:
cd /path/to/package
rm -rf package-lock.json npm-shrinkwrap
npm install
Happen to me when I was coding react native app with expo,
when I was run the app and try to install form npm happen that error.
So just stop run the app and reinstall the package
for me it work fine
Updating npm to latest version worked for me.
A combination of the answers from above worked for me:
Restart the computer ( in my case WSL );
Run the commands from bellow from your chosen terminal, not from VSCode terminal
npm cache clean -f
rm -rf node_modules
rm package-lock.json
npm install
Good luck! :) ✌
Dont run cmd in root of a directory.
there might be one directory inside which u try to run.
cd Directory
npm i
In may case, it was next-i18next.config.js,
that had duplicated languages in the locales value,
and fallbackLng with existing languages refer to existing languages.
This works for me,
rm -rf ./**/node_modules
while I need lerna bootstrap
This worked for me (on command line in Ubuntu):
Update Node using
sudo npm install -g n
followed by
sudo n 16.13.2
Closed and reopened shell, cd back into the correct repo and then
sudo install npm -g
Deleting package-lock.json or node_modules & After running:
npm install -g npm
it is working for me.

npm ERR! 404 Not Found: pinkie-promise

I'm trying to install Ionic Pro, and I am getting this error while pushing through live deploy..
Any help would be gladly appreciated
npm install --quiet --no-optional
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: pinkie#2.0.4 (node_modules/pinkie):
npm WARN 404 SKIPPING OPTIONAL DEPENDENCY: Not Found: pinkie#https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz
npm ERR! code E404
npm ERR! 404 Not Found: pinkie-promise#https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz
npm ERR! A complete log of this run can be found in:
npm ERR! /home/gitlab-runner/.npm/_logs/2018-01-06T18_55_47_426Z-debug.log
npm install --quiet --no-optional failed
Running after script...
$ run "clean-up"
Running Stage clean-up for Job: 5211838
ERROR: Job failed: exit status 1
A little under a year ago, the package "leftpad" broke NPM builds all over the world because the author pulled it from the public repository.
The same is happening today, for "pinkie-promise". The author's NPM account (#floatdrop) was deleted, opening opportunities for malware in all the packages he's written.
Dependent builds include Ionic and (in my case) node-sass.
Resources:
NPM issue: https://github.com/npm/registry/issues/255
Incident report: https://status.npmjs.org/incidents/41zfb8qpvrdj
pinkie-promise issue: https://github.com/floatdrop/pinkie-promise/issues/4
Dependent packages: https://www.npmjs.com/browse/depended/pinkie-promise
All of #floatdrop's repositories: https://github.com/floatdrop?tab=repositories
I was able to work around this by installing pinkie-promise by pointing to their github repo.
npm install https://github.com/floatdrop/pinkie-promise.git
Solution to make project build work again
Since this dependency is not available on npm registry,
one will have to do the following to make it work.
Follow these steps to make things work again.
rm -rf node_modules/
rm -rf package-lock.json
npm i https://github.com/floatdrop/pinkie-promise.git
In the end you will see the output
+ pinkie-promise#2.0.1

`npm install` gives ENOENT errno -2 re missing dezalgo module

I'm trying to run npm install for a little ember-driven site that I've got, but it throws the following error:
npm ERR! path /Projects/Etc/Admin/cuscus/node_modules/npm/node_modules/dezalgo
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/Projects/Etc/Admin/cuscus/node_modules/npm/node_modules/dezalgo' -> '/Projects/Etc/Admin/cuscus/node_modules/npm/node_modules/.dezalgo.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! /Users/mick/.npm/_logs/2018-01-09T01_18_51_322Z-debug.log
If I delete the node_modules directory completely then run npm install again it seems to work, but running it again fails.
What you can try is:
Be sure that you use cmd promt in Admin mode.
If you use VS Code, kill all node procceses. Close it and try again.
Delete package-lock.json and node-modules folder and try again.
Change the node version. For example try the old one v6.11.2
Try to do npm cache clean --force
Try to remove {package}.DELETE in ~/AppData/Roaming/npm/node_modules after the initial npm i -g {package} and retry npm i -g {package}
One of it can help. But not for sure. The status of issue with this problem is open for the moment.
https://github.com/npm/npm/issues/17444
I just had this issue when setting up a new machine. None of the cache clean/uninstall/reinstall steps worked for me.
However, I was able to resolve it by updating npm to the latest version. I had 5.6.0 installed, but using npm-windows-upgrade to install the latest version (5.7.1) cleared up the dependency issues.
See this answer for more information on upgrading npm on Windows:
https://stackoverflow.com/a/31520672/91189
This most likely happened because you updated your node version and because you probably already had this repo sitting on your machine before that particular update, the package-lock.json file whose sole purpose is to track the present and past state of your node_modules file and maintain a very updated dependency tree such that amongst entities using your code there will be consistency installing exactly the same dependencies ;
Entities using your code include
Teammates
Deployments (AWS ECS),
and Continuous integration tools like Travis CI that are running your code,
Try to delete the package-lock.json file. Run the npm install command and you should be fine.
The last thing you should try doing is deleting the missing package if you are not sure of what you are doing, it's usually better to avoid this.
Goodluck.