Yarn errors when running (context: Setting up WunderGraph GraphQL instance) - yarnpkg

Context:
I am attempting to run the demo from Wundergraph on a work computer. When I get to installing Wundergraph with Yarn, it fails. The Wundergraph error is.
Internal Error: Error when performing the request
at ClientRequest.<Anonymous> (C:Users\{user name here}\AppData\Roaming\npm\node_modules\corepack\dist\corepack.js :3927:20)
at ClientRequest.emit (noe:events:390:28)
at TLSSocket.socketErrorListener (node:_http_client:447:9)
at TLSSocket.emit (node:events:390:20)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
With the socket issue, I am guessing there is a proxy or some other security issue on the client computer. I have successfully run the following on a separate, personal computer:
yarn global add #wundergraph/wunderctl#latest
No variation of yarn commands work on the work, computer (fails with any of the following):
yarn
yarn global add #wundergraph/wunderctl#latest
To eliminate possibilities:
On my local machine, yarn will not properly add path to wunderctl, which means searcing out the .exe to get the samples installed. This is a minor oversight in the demo, as the demo now works.
Does not matter if the command prompt is run as me or as administrator. It fails either way.
Fails on VPN and off, so VPN not the issue.
I can get things installed with NPM, but that appears to successfully install the .js files from Wundergraph and not the .exe. I am thinking this might be a clue.
I am going to work with others who say they have it installed and see how they did it, but that won't happen until next week. As I am contract and they are employees, it could end up being additional restrictions.
As this does it with yarn, as well as yarn {install command here}, I am guessing it is some check yarn does every time, or permissions on the yarn files themselves.
I know this is a long shot, but hoping someone encountered this and has found a way down the Rabbit Hole and then back out of wonderland. My fear is having to go full manual, edit the sample files heavily to eradicate yarn (for npm, most likely), have to wait until Wundergraph goes open source and grab the bits, work strictly from command line, or all of the above.
I have done a lot of searching for an answer before coming here.

I had the same problem with another package, with exactly the same error call stack.
First I updated NodeJS to the latest stable version 16.13.1 (I had 14.16.0). After that yarn showed signs of life:
yarn install v1.21.1
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
But then it failed with
RequestError: connect ETIMEDOUT {ip address}:443
at ClientRequest.<anonymous> (node_modules\got\source\request-as-event-emitter.js:178:14)
at Object.onceWrapper (node:events:510:26)
at ClientRequest.emit (node:events:402:35)
at ClientRequest.origin.emit (node_modules\got\node_modules\#szmarczak\http-timer\source\index.js:37:11)
at TLSSocket.socketErrorListener (node:_http_client:447:9)
at TLSSocket.emit (node:events:390:28)
That ip address was indeed unreachable due to a routing problem, after I fixed that all went well.

Related

Can't properly install hardhat using Powershell! Persistent Error HH12: Trying to use a non-local installation of Hardhat, which is not supported

Below is a short list of my setup until I stumble upon the HH12 Hardhat Error that I keep getting:
mkdir wave (Name of my directory)
cd wave
npm init -y
npm install —save-dev hardhat
npx hardhat
Choose sample project
6a. Hardhat project root (Select)
6b. Add .gitignore
Say yes to everything
install the remaining dependencies: npm install --save-dev #nomiclabs/hardhat-waffle ethereum-waffle chai #nomiclabs/hardhat-ethers ethers
npx hardhat accounts (to see all the different accounts)...
...And then it fails here! An HH12 Hardhat Error Message: "Hardhat is not installed or installed globally. You tried to run Hardhat from a global installation or not installing it at all. This is not supported. Please install Hardhat locally using npm or Yarn, and try again." (https://hardhat.org/errors/) [BTW, these 2 lines are the ONLY docs on this error on Hardhat!].
Any suggestions?
I have tried the following possible 'fixes' to sidestep this error but to no avail:
Updating most current version of node
Restarting my PC (About 17 X now as of this writing)
Using GitBash (Instead of Powershell)
Asking mods in Hardhat Discord (None) and other Discords
Opening the Hardhat docs (And the Tutorials!!) for answers... None!
StackExchange - There's literally only 1 other person who ALSO had this problem here! But the answers here are not the solution. (Have DMd that person but no reply as of yet).
So can anyone out there help?
I believe I finally figured out the solution (at least what worked for me):
I dropped back 2 directory levels from where I was for my root project and started again there.
I updated my Node version to 16.

command not found: mssql on macOS

I installed mssql using
npm install -g sql-cli
and it was installed succesfully.
The output after insallation:
`npm WARN deprecated sprintf#0.1.5: The sprintf package is deprecated in favor of sprintf-js.
npm WARN deprecated core-js#1.2.7: core-js#<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
/usr/local/Cellar/heroku-node/12.21.0/bin/mssql -> /usr/local/Cellar/heroku-node/12.21.0/lib/node_modules/sql-cli/bin/mssql
sql-cli#0.6.2
updated 1 package in 6.057s`
However, when I try to run
mssql -u sa -p myPassw0rd
I get an error that says
command not found: mssql on macOS
I also made sure that
/usr/local/Cellar/heroku-node/12.21.0/lib/node_modules/sql-cli/bin/mssql is in my $PATH variable
What is the solution to this issue?
I am using
npm v6.14.10
node v12.21.0
macOS Bug Sur 11.6
When adding sql-cli your path, make sure to add the directory containing the executable rather than the executable itself.
In your case, add /usr/local/Cellar/heroku-node/12.21.0/lib/node_modules/sql-cli/bin to your path, rather than /usr/local/Cellar/heroku-node/12.21.0/lib/node_modules/sql-cli/bin/mssql.
I've got the same error and I've seen some tutorials in youtube getting the same message. Changing the path did not work for me. I checked the logs docker logs <container_id> and got the message:
ERROR: Unable to set system administrator password: Password
validation failed. The password does not meet SQL Server password
policy requirements because it is not complex enough. The password
must be at least 8 characters long and contain characters from three
of the following four sets: Uppercase letters, Lowercase letters, Base
10 digits, and Symbols
When I used a different password, it started to work correctly despite of the warnings.

Yarn encounters 404 error installing local and remote packages for specific project folder

I'm encountering the following message when installing packages:
YN0001: │ HTTPError: Response code 404 (Not Found)
at se.<anonymous> (C:\Code\.yarn\releases\yarn-berry.cjs:23:10082)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:93:5)
This happens for both a local package using yarn add ../my-package or remote package (testing using yarn add lodash).
When I'm in another project on the same computer, the package is installed fine. What could be causing this?
This could be that a yarn link has been deleted. When making the symlink using yarn link, a resolutions field is added in package.json. Just having this link however is not adequate.

`npm install` issues/failure with expo-cli and react-native-app

I really need some help with what seems to be the most basic task (setting up the expo/react-native project). I've installed the expo-cli (v3.11.7), react-native (v2.0.1), watchman (v4.9.0) and node (v12.14.1). I've followed the tutorial up until the point where I need to run expo start and I get the following error:
Your project is in SDK version >= 33.0.0, but the expo package version seems to be older.
Error: node_modules directory is missing. Please run npm install in your project directory.
Couldn't start project. Please fix the errors and restart the project.
Set EXPO_DEBUG=true in your env to view the stack trace.
I've then run npm install and tried again but the same error pops up. I've removed the node_modules folder and that didn't work either.
Update:
When I npm install this is the error I'm seeing:
npm WARN deprecated core-js#1.2.7: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to https://codeload.github.com/expo/react-native/tar.gz/sdk-36.0.0 failed, reason: write EPROTO 4521895360:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1544:SSL alert number 40
I've installed yarn (v1.21.1) and tried installing using this with the same error:
warning expo > fbemitter > fbjs > core-js#1.2.7: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
error An unexpected error occurred: "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz: write EPROTO 4356277696:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1544:SSL alert number 40
Can anyone advise?
I've managed to solve the problem. I was trying to install over my home network, which apparently has some proxy restrictions! No idea why.
Someone advised me to try again but connected to another network or my mobile hotspot. I tried this and it worked! Problem solved. So I guess for any others that may be experiencing the same problem, try connecting to another network and see if that helps.
If this fails, then I suppose looking at the proxy configuration and making changes there may help. But I wouldn't advise doing this unless you know exactly what you're doing.

running towerjs on windows 8 gives a TypeError

I installed tower#0.4.2-22 on my windows 8 machine. After this I tried to verify the installation. I started mongod server, the tower server and called http://localhost:3000 in my browser. I get the error messages (in browser window and server log):
TypeError: Object Windows 8 has no method 'match'
at Object.Tower.MiddlewareAgent [as handle] (C:\Users\Philipp\Documents\Scripts\tower\Tests\test01\node_modules\tower\lib\tower-middleware\server\agent.js:13:21)
at next (C:\Users\Philipp\Documents\Scripts\tower\Tests\test01\node_modules\tower\node_modules\connect\lib\proto.js:199:15)
at Object.handle (C:\Users\Philipp\Documents\Scripts\tower\Tests\test01\app\config\server\bootstrap.coffee:23:14)
at next (C:\Users\Philipp\Documents\Scripts\tower\Tests\test01\node_modules\tower\node_modules\connect\lib\proto.js:199:15)
at Object.methodOverride [as handle] (C:\Users\Philipp\Documents\Scripts\tower\Tests\test01\node_modules\tower\node_modules\connect\lib\middleware\methodOverride.js:37:5)
at next (C:\Users\Philipp\Documents\Scripts\tower\Tests\test01\node_modules\tower\node_modules\connect\lib\proto.js:199:15)
at multipart (C:\Users\Philipp\Documents\Scripts\tower\Tests\test01\node_modules\tower\node_modules\connect\lib\middleware\multipart.js:64:37)
at module.exports (C:\Users\Philipp\Documents\Scripts\tower\Tests\test01\node_modules\tower\node_modules\connect\lib\middleware\bodyParser.js:57:9)
at urlencoded (C:\Users\Philipp\Documents\Scripts\tower\Tests\test01\node_modules\tower\node_modules\connect\lib\middleware\urlencoded.js:51:37)
at module.exports (C:\Users\Philipp\Documents\Scripts\tower\Tests\test01\node_modules\tower\node_modules\connect\lib\middleware\bodyParser.js:55:7)
I tried to figure out what's happened and find out that in module
\node_modules\tower\lib\tower-middleware\server\agent.js
the method calls
mac: !!agent.os.match(/mac/i),
windows: !!agent.os.match(/win/i),
linux: !!agent.os.match(/linux/i)
failed because agent.os is of type object and not string.
I replaced the lines with
mac: !!agent.os.toString().match(/mac/i),
windows: !!agent.os.toString().match(/win/i),
linux: !!agent.os.toString().match(/linux/i)
and tower comes up and is running.
Is this a bug in the code or was something wrong with my installation?
First I installed tower with npm install power -g
Then I created a app with tower new test01
The next steps were:
- cd test01
- npm install
- forever server.js (failed forever wasn't installed)
- npm install forever -g
- forever server.js (failed mongod wasn't started)
- (started mongodb)
- forever server.js (is running now)
- cake watch (in another prompt - failed, because grunt missing)
- npm install grunt -g
- cake watch (now it's running)
- (go to browser and enter http://localhost:3000)
- (see error description above)
Seems to be a recent bug, probably something that has changed in recent versions of node.js or one of Tower's other depencies, I noticed tower has suddenly gotten a few bug reports for this over the past couple of days, and looks like someone submitted a patch last night
so watch for either that pull request to get accepted or pull it into your own fork of tower.js and try again.

Resources