Extraneous positional argument error (Yarn) when using JupyterLab - jupyter-lab

When I run
jupyter lab
I get
Fail to get yarn configuration. Unknown Syntax Error: Extraneous positional argument ("list").
$ yarn config [-v,--verbose] [--why] [--json]
This is new to me (I've been using jupyter for years without issues) and seems to have started after I switched to Yarn Modern with
yarn set version berry
I thought perhaps that the issue might be the presence of
nodeLinker: pnp
in my .yarnrc.yml but replacing that with
nodeLinker: node-modules
doesn't fix anything.
FWIW, .yarnrc.yml also has
yarnPath: .yarn/releases/yarn-3.2.3.cjs
How do I fix this fatal error?

Related

expo-cli#6.0.6: The engine "node" is incompatible with this module. Expected version ">=12 <=16". Got "18.10.0"

I was running my code about 9 hours ago with no problem. Now, npx react-native run-ios does not work. I figured maybe I needed to run yarn to fix some dependencies, and running yarn got 2/4's through the process before returning the following error...
expo-cli#6.0.6: The engine "node" is incompatible with this module. Expected version ">=12 <=16". Got "18.10.0"
Now I understand what this is telling me, that the expo-cli dependency needs a node version between 12.0.0 and 16.0.0, but I'm slightly taken aback by this, the only way that makes sense to me is if the expo-cli literally updated yesterday night.
I added the following to my package.json in hopes to mitigate the error to no avail...
"engines" : {
"node" : "<=16.0.0"
},
Do I need to downgrade / upgrade the expo-cli? I'm using bare RN but with expo modules appended to it
Weird issue, I restarted my machine and the error disappeared entirely. Hopefully this doesn't happen again or if it does, its as easily fixable

Babel error caused by reference to "process"

I've found myself in a strange predicament—after a recent upgrade to my local app dependencies, the application breaks whenever I make reference to the node process object. Specifically it throws the following errors:
Babel Error: Cannot find module '#babel/plugin-proposal-logical-assignment-operators'
So far, I've tried to resolve this issue with a yarn add of the missing dependency, without success. Could anyone shed light on the issue at hand, or how I might be able to resolve it?
Thanks for your consideration.
I resolved this issue by deleting node_modules and running yarn install.

'C:\Users...' is not recognized as an internal command when starting a project with Yarn

I'm trying to start a project with Yarn using the command yarn create react-app ReportingApp --template typescript however it says that my user is not recognized:
I also tried adding the path in my windows variables (path). However, I still get the error.
I saw this issue in the past and I fixed it by replacing my user name "Gabriel Donada" with the user ID from Windows, but I have not found how to make that again.
Not sure what happened, but I used as workaround start the app using npx create react-app ReportingApp --template typescript

Yarn unable to add packages (both inside and outside workspaces)

Yarn unable to add packages (both inside and outside workspaces)
Hi there, I'm using Yarn 2, I don't seem to be able to install any package. I always get the following formatted error:
$ yarn add useful-package
➤ BR0027: useful-package#unknown can't be resolved to a satisfying range
➤ Errors happened when preparing the environment required to run this command.
I have tried both inside a project that uses yarn's workspaces and outside in another test project.
This occurs with any package I try and Googling around I can't seem to find any relevant hits yet for this error message here.
What do you reckon the issue may be?
Best,
Matt
Turns out I'd hit a Node JS version conflict with Yarn 2.
Make sure to use latest Yarn (berry/2) with a node version V10.19.0 or greater.
I hope this helps someone!
Best,
Matt

What can cause a node project to work on one machine but fail on another? (both are using the same versions of node)

In this case, we have 5 developer machines, and it's working on 3 and not on 2. All are pretty new macs. All are using node 9.4 (via nvm. Also I get the same error with node 10).
The main error we are getting when running yarn start is
.../server/start.js:74
);
^
SyntaxError: Unexpected token )
NOTE 1: The problem is related to trailing commas in babel
https://babeljs.io/docs/en/babel-plugin-syntax-trailing-function-commas/
This comma is automatically inserted by Prettier, I believe!
NOTE 2:
I found the problem is this yarn
=> which yarn
/Users/otto/.anyenv/envs/ndenv/shims/yarn
And when I run yarn in VScode, it works, because it's using a different yarn.

Resources