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
Related
So, I make a Meteor project that uses my MongoDB and other environment variables. Therefore, I create .sh file and write these down.
MONGO_URL="mongodb:<MY DATABASE>" meteor --settings settings.json
However, Meteor cannot realize the current OS is Windows, so it keeps trying to look for meteor modules using Linux's path. Here is the error log.
Runing Meteor with configured db instance in Windows
/mnt/c/Users/mq003/AppData/Local/.meteor/packages/meteor-tool/2.2.0/mt-os.windows.x86_64/meteor: line 137: /mnt/c/Users/mq003/AppData/Local/.meteor/packages/meteor-tool/2.2.0/mt-os.windows.x86_64/dev_bundle/bin/node: No such file or directory
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file C:\Windows\system32\cmd.exe
npm ERR! errno ENOENT
npm ERR! simple-todos-react# w-start: `cd build\bin && bash w-run.sh`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the simple-todos-react# w-start 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\mq003\AppData\Roaming\npm-cache\_logs\2022-12-06T17_29_40_599Z-debug.log
Does anybody know how to do this in Windows? Thank you in advance.
An easy way to address this is to use crossenv https://www.npmjs.com/package/cross-env
cross-env makes it so you can have a single command without worrying about setting or using the environment variable properly for the platform. Just set it like you would if it's running on a POSIX system, and cross-env will take care of setting it properly.
That way if you have team members using Macs and Windows, it's the same commands, and if you get an upgrade to a Mac yourself, it's seamless.
From what I see you have is likely with your PATH variable.
The error explicitly states it can find the Node.js in you executable directory.
Check to see if any of these identifies the problem. Or I could try to further debug .
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! :)
I am trying to install Angular CLI , ran as admin, and got the following errors
npm ERR! code 2
npm ERR! path C:\Windows\system32\node_modules\#angular\cli
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node
./bin/postinstall/script.js
npm ERR! OpenSSL configuration error:
npm ERR! 74160000:error:80000002:system library:BIO_new_file:No such
file or
directory:c:\ws\deps\openssl\openssl\crypto\bio\bss_file.c:67:calling
fopen(C:\Program
Files\PostgreSQL\psqlODBC\etc\openssl.cnf, rb)
npm ERR! 74160000:error:10000080:BIO routines:BIO_new_file:no such
file:c:\ws\deps\openssl\openssl\crypto\bio\bss_file.c:75:
npm ERR! 74160000:error:07000072:configuration file routines:def_load:no
such
file:c:\ws\deps\openssl\openssl\crypto\conf\conf_def.c:179:
I was facing the same issue. Actually I have added OPENSSL for postgre sql thats why It was causing this error. By the way I was installing ionic CLI.
So, go to environment variables, System variables and search for OPENSS_CONF and delete it. For me I deleted this and it worked.
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.
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.