I can't pass through npm run check_txns --dir=minted - github

I have ran npm run check_txns --dir=minted but I keep getting the error. Can you guys help me on it please?
moon#Jungs-MBP create-10k-nft-collection-2.0.0 % npm run check_txns --dir=minted
10k-collection-video#2.0.0 check_txns /Users/moon/Downloads/create-10k-nft-collection-2.0.0
node utils/nftport/checkTxns %npm_config_dir%
Please specify the directory to check. Use "minted" or "revealed"
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! 10k-collection-video#2.0.0 check_txns: node utils/nftport/checkTxns %npm_config_dir%
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the 10k-collection-video#2.0.0 check_txns script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I have ran npm run check_txns --dir=minted but I keep getting the error. Can you guys help me on it please?

The problem is on package.json. Keep in mind the guy who explains in the video is using windows. If you have a Mac, you have to edit the package.json and switch the % symbol to $ symbol. Also you have to remove the $ symbol at the end of the parameters.
Your code should be like this:
"mint": "node utils/nftport/mint $npm_config_start $npm_config_end",
"reveal": "node utils/nftport/revealNFTs $npm_config_start $npm_config_end",
"check_txns": "node utils/nftport/checkTxns $npm_config_dir",
"refresh_os": "node utils/functions/refreshOpensea $npm_config_start
I hope it will work for you! :)

Related

How to set a variable from package.json script using Powershell?

The problem I am currently having is that we have a script in our package.json set to run single test files using the following syntax:
"singleTest": "mocha tests/$MATCH"
However, when I attempt to run this in Windows 10 with Powershell I use the following command and get the error shown:
$env:MATCH="01HOME-01FC-T01.js" && npm run singleTest
Error: No test files found: "tests/$MATCH"
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! selenium-js-example#2.0.0 singleTest: `mocha tests/$MATCH`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the selenium-js-example#2.0.0 singleTest script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
It seems as if it is not setting the file name to the variable MATCH at all. I would really appreciate if someone can shed some light on what am I doing wrong or what would be the proper way to run this using Powershell 7.1.
You can chain commands in Powershell by using semicolon. You cannot use && like in bash.
$env:MATCH="01HOME-01FC-T01.js"; npm run singleTest

vscode.d.ts could not be installed

when I tried to run vscode-install, it would fail to sync vscode.d.ts. The problem seems random, most of our machines could not success, but two of our machines could success.
The error information is as follows:
Detected VS Code engine version: ^1.23.0
Error installing vscode.d.ts: Error: read ECONNRESET
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lispvsext#0.0.1 postinstall: `vscode-install && node ./node_modules/vscode/bin/install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lispvsext#0.0.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\*\AppData\Roaming\npm-cache\_logs\2019-02-15T09_28_45_624Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lispvsext#1.0.8 postinstall: `cd extension && npm install && cd ..`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lispvsext#1.0.8 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\*\AppData\Roaming\npm-cache\_logs\2019-02-15T09_28_45_805Z-debug.log
I had a similar problem, where the VSCode engine in package.json was very old (1.32.0) compared to the current VSCode version (1.64.2). I just updated the engine to the same as my VSCode version in package.json:
"engines": {
"vscode": "^1.64.2"
},
and the tests runner proceeds instead of erroring as before.
Unfortunately, I then got another error:
Error: Running extension tests from the command line is currently only supported if no other instance of Code is running.
which is a different problem and a limitation of VSCode at the moment (1.64.2), though there is a workaround for that.

Error: package reason-react not found or built

After running:
bsb -init my-react-login-app -theme react
Then, I ran the following to, as I understand, build the project:
$npm run build
But, I got the following error output:
> my-react-login-app#0.1.0 build /Users/kevinmeredith/Workspace/my-react-login-app
> bsb -make-world
Package not found: resolving package reason-react in /
File "bsconfig.json", line 1
Error: package reason-react not found or built , if it is not built
Please run 'bsb -make-world', otherwise please install it
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! my-react-login-app#0.1.0 build: `bsb -make-world`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the my-react-login-app#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/kevinmeredith/.npm/_logs/2018-06-24T01_36_13_899Z-debug.log
How can I resolve this issue?
See the readme; that template needs you to install reason-react through npm install or yarn add. After that it should work. We don't check in the entire reason-react dependency chain in the template.

npm link <package> error code: 128

I am developing a piece of software and realised that a part of it should be a separate package. Before splitting the code, I decided to try the npm link command. I followed the npm documentation to create a dummy package (exactly what the documentation describes - exports.printMsg = function(){} ...) to link to and followed the documentation about npm link. The first part (symlink to /lib/node_modules) worked perfectly. The second part failed with following error message :
npm WARN deprecated node-uuid#1.4.1: Use uuid module instead
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t http://stash.grupa.onet/scm/oacc/node04-iconv.git
npm ERR!
npm ERR! fatal: unable to access 'http://stash.grupa.onet/scm/oacc/node04-iconv.git/': Could not resolve host: stash.grupa.onet
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! /home/lisa/.npm/_logs/2017-08-02T16_29_12_731Z-debug.log
Could you help me out, please? All I found about similar errors suggest to reboot my PC (what I did) or to upgrade npm (I am running 5.3.0).
What I don't understand is why a command that should symlink a package is trying to resolve something...

trying to install mongodb via npm and getting EINVAL errors

I'm trying to install packages using NPM. For example I'm trying to get install mongodb on ubuntu 14.04 by the usual
Sudo npm install mongodb
I get this error
npm ERR! tar.unpack untar error /home/cougs/.npm/mongodb/2.0.45/package.tgz
npm ERR! Linux 3.13.0-61-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "mongodb"
npm ERR! node v4.1.2
npm ERR! npm v2.14.4
npm ERR! path /mnt/nfs_data/byucougars.com/RebelFleet/app/node_modules/mongodb/package.json
npm ERR! code EINVAL
npm ERR! errno -22
npm ERR! syscall chown
npm ERR! EINVAL: invalid argument, chown '/mnt/nfs_data/byucougars.com/RebelFleet/app/node_modules/mongodb/package.json'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /mnt/nfs_data/byucougars.com/RebelFleet/app/npm-debug.log
I'm pretty sure it's a permission issue with my user. probably when I copied stuff to the server via FTP, it screwed things up stuff. I just have no idea how to fix this.
One way to fix this would be to override chown() by LD_PRELOAD to interpose a function which always returns zero ("success"). So instead of
#npm install
you would do
#echo "int chown() { return 0; }" > preload.c && gcc -shared -o preload.so preload.c
#LD_PRELOAD=$PWD/preload.so npm install
I figured out that my code was running on a MNT nfs server using version 4.0. Which changes all permissions to nobody and it was causing the issue to repeat every time I try to fix it. So I just migrated the code back to the original server and it worked fine after that.