Checksum did not match in 'npm i' - npm

when i use npm i to install node_moudles,but something was wrong.
It said:
PhantomJS not found on PATH
Download already available at C:\Users\hdu42\AppData\Local\Temp\phantomjs\phantomjs-2.1.1-windows.zip
Checksum did not match
But in fact, in this directory on my computer, this file exists.
I don't understand why should I redownload it.
Anybody know? thanks!!!

Error is because of:
Phantomjs present in your \Local\Temp is not matching the checksum; defined in repository which is referring to PHANTOMJS_CDNURL-> environment variable.
Solution:
Download phantomjs from https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-windows.zip
Extract the zip
Add the path of bin C:\Users\YourUser\phantomjs-2.1.1-windows\phantomjs\bin; in your environment path

Related

Slither cannot find the dependency with #openzeppelin

Error: Source "#openzeppelin/contracts/token/ERC721/ERC721.sol" not found: File not found. Searched the following locations: "".
Currently, all dependencies from #openzeppelin are showing errors like this. But those dependencies have been installed in my node_modules and I don't know why it can't find the file. Is there a way I can set the location, or should I install the #openzeppelin/contracts globally?
UPDATE:I can see that --base-path should be set for solc, but I am still not sure how to apply such setting to slither.
I found a (might be dirty) way to solve it:
Step 1: Go to the directory where all your dependencies are.
In my case, do cd node_modules
Step 2: Call the same command with the updated relative path.
In my case, from slither contracts/MyContract.sol to slither ../contracts/MyContract.sol
And it just works. After going through the doc, I don't think Slither is providing a way to adjust --base-path as a flag.

How can I download the source code of Artifactory NPM modules?

I need the source code of the NPM modules inside the artifactory installation #jfrog folder artifactory-oss-7.7.3/app/frontend/bin/server/dist/node_modules/#jfrog. Checking the package.json files I see the following
,"_resolved": "https://entplus.jfrog.io/artifactory/api/npm/npm-virtual/#jfrog/nodejs-commons/-/#jfrog/nodejs-commons-2.0.2.tgz"
However, when I try to follow the link I get a Forbidden error. I also see references to a git repository:
git.jfrog.info/~odedb/jfrog-artifactory-nodejs-client.git
However, I get a timeout error for accessing. Any clue on how to download these files?
The latest version of Artifactory OSS source code can be downloaded from https://jfrog.com/open-source/.
The direct download link: https://releases.jfrog.io/artifactory/bintray-artifactory/org/artifactory/oss/jfrog-artifactory-oss/[RELEASE]/jfrog-artifactory-oss-[RELEASE]-linux.tar.gz
[RELEASE] is replaced automatically to latest, if you need specific version, pls replace with version number.

How do I specify JRE when creating a Bamboo sidekick agent for their per-build-container plug-in?

Trying to get the sidekick image built and having some issues. Is there any documentation other than the README.md file?
My current problem is with getting the JRE requirement working but there are others. The page says "download Oracle JRE and place it inside the working directory. Optionally if you have a company wide distribution url, use that one at a later step." and the help says "Java (JRE) download url or path inside working directory". Have not been able to get this to work.
I went to the JRE link provided and was presented with options to download a rpm file or a tar.gz file. Which is expected (was unable to get either one working)?
It says to place the file in the "working directory" but not sure where exactly. Tried in sidekick folder and in sidekick/jre both without success no matter what I used after the -j command. Is this just the path or should the filename be included as well? Can I get an example?
I'm running this script using my login but noticed the output folder is being created with root user and group. I see no indication that this should be run with sudo. What is the correct way to run this script?
Using debug, I see the function "download if not cached". Can I save these files (JRE, Bamboo jar file, etc.) somewhere so I don't have to worry about downloading them? If so, where should they go? Looks like I might have a problem with the wget to d/l the jar file so would like to just be able to place all these in a folder and be done with it.
It looks like the major problem is the script didn't clean up after itself if it fails. The issue was the first time it failed then that caused subsequent issues as the output folder was already there. Removing this directory between each attempt help.
As for the correct syntax for the -j JRE option I manually downloaded the JRE and placed in a folder called per-build-container/sidekick/stuff/. For the command line it is not just the path but the file name as well (the tar.gz and not the RPM). For my case it was
-j stuff/jre-8u251-linux-x64.tar.gz
Note I also ran the script as sudo. Wasn't stated but seemed to work OK.
Another issue I ran into was the download of the agent jar file. There is a redirect in the wget file that was not working for us. I ended up editing the script and replacing the Altassian based url with the redirected one.
This addresses all the issues I ran into with the initial question.

NPM on LEMP cannot find module, wrong path

Total Linux noob here. I am trying to configure a Pleroma development environment on DO droplet. Installed LEMP, installed SSL, installed PostgreSQL, installed Pleroma, so far so good.
Then I installed Node, NPM, cloned Pleroma-FE (apparently it installs in /user/pleroma-fe folder). I am following the very brief build instructions here:
https://git.pleroma.social/pleroma/pleroma-fe
When I get to the command in those build instructions: npm run build
I am getting error: Error: Cannot find module '/user/build/build.js'
It's because actual path to the build file is /user/pleroma-fe/build/build.js
Apologies if this is a duplicate. I see other questions about this.
Fixing npm path in Windows 8 and 10
and the reply seems to set the PATH. This answer might apply to my situation. But my question is: it is clearly already looking in a well defined path (which is different from all the other questions, which don't seem to have well defined path in the error message). But it is the wrong path. How do I make it look in the correct path?
I tried the npm command and specified the complete path, and every variation. and none worked. So it seems fixing the path won't fix this problem.
Sorry I do not currently know enough Linux to be able to fix this. I tried to tag this with Pleroma but I don't have enough reputation to create a new tag. Any help is much appreciated. Thanks in advance.
I continued to work on this with some help of a Linux admin on Fiverr and the Pleroma developers chat with success, thanks to all.
The solution did not involve changing the path. There were several different things going on. First, I needed to change directory into the development project source folder:
cd pleroma-fe
Once I did that, npm found the build module. Next issue was Node was very old and I needed to get the latest version. I used the instruction here for NodeJS (10):
https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
Next issue was npm was missing some modules. This was fixed with:
npm install
After that the build completed with no errors.
npm run build
After a successful build, you will see a list of files that have changed as a result of the build.
Next issue is that simple changes in HTML text were not live, ie. not reflected in the refreshed web page. This is fixed by copying all the resulting build files to the production folder using rsync. In my case the command was:
rsync -av /user/pleroma-fe/dist/ /home/pleroma/pleroma/priv/static/
Pleroma is a neat Twitter-like user interface to ActivityPub fediverse, it includes a Mastodon UI as well, and thanks to the developers for making it free and open source.

how to install a package in golang

I try to connect to SQL server in golang, I searched in internet and through this address: https://github.com/denisenkom/go-mssqldb I understood that first I need to install a package for the purpose, but when I want to install this package through git terminal by entering this command:
$ go get github.com/denisenkom/go-mssqldb
I receive this error :
can't load package: package github.com/denisenkom/go-mssqldb: no buildable go source files in C:\Go\src\github.com\dnisenkom\go-mssqldb
my $GOPATH is already set.I don't know how to fix this problem ...
According to the golang website:
Get downloads and installs the packages named by the import paths, along with their dependencies.
It sounds like the download isn't working, which is causing the folder to be empty. One alternative is to download the driver as a zip file and run go install on the folder.