Yarn error - getting this error when running any yarn commands - yarnpkg

Getting the following error when running any yarn command:
[1]: https://i.stack.imgur.com/jUWCT.png
The yarn error log is as follows:
Trace:
TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["authorization"]
at ClientRequest.setHeader (_http_outgoing.js:564:3)
at new ClientRequest (_http_client.js:262:14)
at Object.request (https.js:370:10)
at Request.module.exports.Request.start (/usr/local/Cellar/yarn/1.22.19/libexec/lib/cli.js:141452:32)
at Request.module.exports.Request.end (/usr/local/Cellar/yarn/1.22.19/libexec/lib/cli.js:142211:10)
at end (/usr/local/Cellar/yarn/1.22.19/libexec/lib/cli.js:141265:14)
at Immediate._onImmediate (/usr/local/Cellar/yarn/1.22.19/libexec/lib/cli.js:141279:7)
at processImmediate (internal/timers.js:464:21)
Anyone have any ideas on how to resolve this issue?

Related

Getting this error after running in the cypress dashboard

I am getting this are after running all of my test cases in the cypress dashboard. Can anyone help me to solve this issue? Test cases are running no issues in there.
An error was thrown in your plugins file while executing the handler for the after:run event.
The error we received was:
Error: spawn cucumber-json-formatter.exe ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

Sorry-Cypress --> RequestError: Error: Invalid URI "/runs" when running the tests in parallel

I was trying to run the cypress tests in parallel using sorry-cypress. Getting below error when i run the scripts in parellel. Can someone help on how can i resolve this issue?
npx cy2 run --record --key XXX --parallel --ci-build-id 'build01'
C:\sorry-cypress-demo>npx cy2 run --record --key XXX --parallel --ci-build-id 'build01'
npm does not support Node.js v15.3.0
You should probably upgrade to a newer version of node as we
can't make any promises that npm will work with this version.
You can find the latest version at https://nodejs.org/
[cy2] Running cypress with API URL: "http://localhost:1234/"
We encountered an unexpected error talking to our servers.
We will retry 3 more times in 30 seconds...
The server's response was:
RequestError: Error: Invalid URI "/runs"
We encountered an unexpected error talking to our servers.
We will retry 2 more times in 1 minute...
The server's response was:
RequestError: Error: Invalid URI "/runs"
We encountered an unexpected error talking to our servers.
We will retry 1 more time in 2 minutes...
The server's response was:
RequestError: Error: Invalid URI "/runs"
We encountered an unexpected error talking to our servers.
We will retry 0 more times in ...
The server's response was:
RequestError: Error: Invalid URI "/runs"
We encountered an unexpected error talking to our servers.
Because you passed the --parallel flag, this run cannot proceed because it requires a valid response from our servers.
The --ciBuildId flag you passed was: 'build01'
The server's response was:
RequestError: Error: Invalid URI "/runs"
I don't know if helps you too but for me works, when I correctly set up CYPRESS_API_URL. Something like this:
cross-env CYPRESS_API_URL=http://localhost:1234/ cy2 run --parallel --record --key XXX --config-file cypress.config.ts --ci-build-id 'build01'

yarn deploy give error with Command failed with exit code 1 when running collection-examples-as

I am trying to run the collection-examples-as near example but when I run yarn deploy it gives me the following error
$ near dev-deploy --wasmFile="./contract.wasm"
Starting deployment. Account id: dev-1637744501224-6323200, node:
https://rpc.testnet.near.org, helper: https://helper.testnet.near.org, file:
./contract.wasm
An error occurred
Error: ENOENT: no such file or directory, open './contract.wasm'
[Error: ENOENT: no such file or directory, open './contract.wasm'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: './contract.wasm'
}
error Command failed with exit code 1.
I think the error is it can't find the path to ./contract.wasm so I run yarn build the I tried to deploy it again using yarn deploy but I got another error which is:
$ near dev-deploy --wasmFile="./contract.wasm"
Starting deployment. Account id: dev-1637744501224-6323200, node:
https://rpc.testnet.near.org, helper: https://helper.testnet.near.org, file:
./contract.wasm
An error occurred
Error: Can not sign transactions for account dev-1637744501224-6323200 on network
default, no matching key pair found in
InMemorySigner(MergeKeyStore(UnencryptedFileSystemKeyStore(/home/rasha/.near-
credentials), UnencryptedFileSystemKeyStore(/home/rasha/collection-examples-
as/neardev))).
{
type: 'KeyNotFound',
context: undefined
}
any help or suggestions?
There's an issue with old versions of near-cli and dev-deploy.
As a workaround, you can try running the latest cli directly from your terminal:
near dev-deploy --wasmFile="./contract.wasm" -f
Just check that you installed the latest version of near-cli, currently 2.2.0. You can check your version with near --version.
Be sure to run yarn build first, so you'll have the compiled contract.wasm file.
Note: When you run yarn deploy, it uses the old near-cli version defined in package.json. (probably some old version like 1.6.0)
You might also want to check this GitHub issue (dev-deploy error): https://github.com/near/create-near-app/issues/1408

How to resolve yarn error: Invalid violation: Expected a key

I faced some issues with yarn. Thus uninstalled and reinstalled it via homebrew (mac). Now on running any yarn command getting the below error (even on yarn -v)
Invariant Violation: Expected a key
at invariant (/usr/local/Cellar/yarn/1.22.15/libexec/lib/cli.js:2314:15)
at Parser.parse (/usr/local/Cellar/yarn/1.22.15/libexec/lib/cli.js:64434:55)
at parse (/usr/local/Cellar/yarn/1.22.15/libexec/lib/cli.js:64581:21)
at module.exports.exports.default (/usr/local/Cellar/yarn/1.22.15/libexec/lib/cli.js:64143:96)
at loadRcFile (/usr/local/Cellar/yarn/1.22.15/libexec/lib/cli.js:56986:58)
at /usr/local/Cellar/yarn/1.22.15/libexec/lib/cli.js:56960:14
at /usr/local/Cellar/yarn/1.22.15/libexec/lib/cli.js:101468:14
at Array.map (<anonymous>)
at parseRcPaths (/usr/local/Cellar/yarn/1.22.15/libexec/lib/cli.js:101466:78)
at Object.findRc (/usr/local/Cellar/yarn/1.22.15/libexec/lib/cli.js:101480:10)
Since none of the yarn commands are working not able to clear the yarn cache as well. How to resolve this issue?
Ran into the same issue today, turns out it was caused by an empty string in the yarn.lock file:
"#dockite/field#>= 1.1.14", "", "#dockite/field#^1.1.0","#dockite/field#^1.1.33":

composer-playground EACCES error when lauching

When I'm trying to start composer-playground from ubuntu I got the error:
$ composer-playground info: [Hyperledger-Composer] :LoadModule
:loadModule() Loading composer-wallet-filesystem from
/home/rui.oliveira/.nvm/versions/node/v8.11.3/lib/node_modules/composer-playground/node_modules/composer-wallet-filesystem
info: [Hyperledger-Composer] :PlaygroundAPI :createServer()
Playground API started on port 8080 events.js:183
throw er; // Unhandled 'error' event
^
Error: EACCES: permission denied, open '/home/...log'
When I go to the log file the only entry I've got is:
2018-09-21T20:38:52.508Z ERROR :HLFConnectionManager
:fabric-client() [ChannelEventHub.js]: _connect - timed out
after:300000 {}$
My current log level is: composer[debug]:*
I'm using REST Server with oauth and multi-user and I can do GET or POST with success (HTTP200) but when I do a POST transaction nothing is set to the peers.
Can someone help trying to debug this?
EACCES is permission denied but not sure what is really being denied here...
Thanks in advance.

Resources