Why is Yarn not working on Ventura and how do I get it to work? - yarnpkg

Since I installed Ventura I've been having an impossible time with Yarn. This command works on a normal linux environment but will not work on either of my Ventura machines. I've tested this on all environments using the same version of yarn (i.e. 1.22.19) and of nodejs (i.e. 12.22.12).
% yarn add -D #quasar/quasar-app-extension-testing-unit-jest
yarn add v1.22.19
[1/5]  Validating package.json...
[2/5]  Resolving packages...
warning #quasar/quasar-app-extension-testing-unit-jest > babel-jest > #jest/transform > jest-haste-map > sane#4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
warning #quasar/quasar-app-extension-testing-unit-jest > vue-jest > babel-plugin-transform-es2015-modules-commonjs > babel-runtime > core-js#2.6.12: core-js#<3.23.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. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
warning #quasar/quasar-app-extension-testing-unit-jest > jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > w3c-hr-time#1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
[3/5]  Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/typescript/-/typescript-4.2.2.tgz: incorrect data check".
info If you think this is a bug, please open a bug report with the information provided in "/Users/noeldacosta/repo/gitlab/netbuilder/cpd/cpd-portal/client/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Related

EAS build gives: Invalid `RNGestureHandler.podspec` file: undefined method `exists?'

Recently, when I yarn eas build my expo project I have started failing with
[INSTALL_PODS] Using Expo modules
[INSTALL_PODS] [Expo] Enabling modular headers for pod ExpoModulesCore
...
[INSTALL_PODS] [!] Invalid `Podfile` file:
[INSTALL_PODS] [!] Invalid `RNGestureHandler.podspec` file: undefined method `exists?' for File:Class.
...
[INSTALL_PODS] # -------------------------------------------
[INSTALL_PODS] #
[INSTALL_PODS] > isUserApp = File.exists?(File.join(__dir__, "..", "..", "node_modules", "react-native", "package.json"))
[INSTALL_PODS] # if isUserApp
[INSTALL_PODS] # -------------------------------------------
I don't build locally often (remote builds on the Expo servers do fine) so any number of things might have triggered this over the past several weeks, including a migration from an Intel MBP to an M2 MBA, but I wonder if there's an obvious reason that someone has experience with. The error suggests there's something wrong with the podfile's use of an undefined method. But the suggestions for addressing this I've found online involve all kinds of tweaking that are way beyond what I'm familiar with. My experience with Expo/EAS just been to be sure to
brew install cocoapods fastlane
and don't involve much more than that. Ideally I'd like to avoid messing with special gem installations of the sort suggested as quick fixes.
So the question is: is this indeed just a bug in a podfile (use of a deprecated method) that will eventually get fixed?
UPDATE: Broadly it seems that the answer is "yes": this does get fixed in later versions of the affected packages, but those packages are not officially compatible with Expo. If I update them to versions that allow building, then I get warnings:
[RUN_EXPO_DOCTOR] [16:17:37] Some dependencies are incompatible with the installed expo package version:
[RUN_EXPO_DOCTOR] [16:17:37] - react-native-gesture-handler - expected version: ~2.8.0 - actual version installed: 2.9.0
[RUN_EXPO_DOCTOR] [16:17:37] - react-native-reanimated - expected version: ~2.12.0 - actual version installed: 2.14.4
so the question becomes: when will Expo officially support package versions required to successfully build?
Ruby 3.2.0 removed File.exists?.
This issue was reported on the expo repo on GitHub.
The recommended fix is to upgrade to expo#47.0.13.

Beam Dataflow job stuck after upgrading the Apache Beam version from 2.27.0 to 2.32.0

Currently I am in a process of upgrading the Apache Beam version from 2.27.0 to 2.32.0 but when I start my jobs on Dataflow runner the job stucks during the worker-startup and it never finish installing dependencies. The python version is 3.7
This is what I see in the logs
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime
After initial analysis it looks like this is the issue with pip dependencies backtracking and it keeps on downloading and installing dependencies. These are some warnings in the logs
INFO: pip is looking at multiple versions of google-auth to determine which version is compatible with other requirements.
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead:
This is the setup.py for the Beam
import setuptools
REQUIRED_PACKAGES = [
"numpy==1.21.4",
"pandas==0.25.3",
"dateparser==1.1.0",
"python-dateutil==2.8.2",
"pytz==2021.3",
"google-api-core==1.14.0",
"google-cloud-storage==1.36.1",
"fastavro==0.22.10",
]
setuptools.setup(
name="data-workflows",
version="0.1.0",
install_requires=REQUIRED_PACKAGES,
packages=setuptools.find_packages(),
)
The pipelines used to run fine in the Beam version 2.27.0. I am not sure if these warnings are the cause of the issue. Could someone please help me to identify the root cause of this problem?

Heroku-18 w/ .NET Core GDI+: Unable to load DLL 'libgdiplus': The specified module could not be found

Since upgrading from Heroku-16 to Heroku-18 stack, my .NET Core 2.2 App that references System.Drawing.Common to use GDI+ throws the error:
System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
--->System.DllNotFoundException: Unable to load DLL 'libgdiplus': The specified module could not be found.
at System.Runtime.InteropServices.FunctionWrapper `1.get_Delegate()
at System.Drawing.SafeNativeMethods.Gdip.GdiplusStartup(IntPtr& token, StartupInput& input, StartupOutput& output)
at System.Drawing.SafeNativeMethods.Gdip..cctor()
This is because libc6-dev is not installed (see this issue). I'm using heroku-buildpack-apt to install both libgdiplus and libc6-dev), but it appears that the package is no longer available at runtime on Heroku-18, only at build time (see this page).
From the build log:
remote: -----> Fetching .debs for libc6-dev
remote: Reading package lists...
remote: Building dependency tree...
remote: Reinstallation of libc6-dev is not possible, it cannot be downloaded.
remote: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reverting back to Heroku-16 solves the issue.
How can this I make this work on the Heroku-18 stack?? Anyone found a way?
From Heroku support:
I am really sorry for the trouble but it will not be possible in my view. This package libc6-dev2.27-3ubuntu1 means that the package is available only at build time, but not at runtime. Moreover if you have some requirement you can check https://elements.heroku.com/buildpacks/eugeneotto/heroku-buildpack-secp256k1 but this is not officially supported buildpack and we do not provide support for this.
.NET Core 3.x, together with the latest version of System.Drawing.Common, contain fixes which remove the dependency on libc6-dev.
If installing libc6-dev is not possible, you can try to:
Upgrade to .NET Core 3.0
Upgrade to libgdiplus 4.6.0 or later (I'd recommend 4.7.0)

how to setup firefox debugger properly?

I tried the steps for quick setup of firefox debugger at http://firefox-dev.tools/debugger/#quick-setup a few times but had the same problem.
I have pasted all my commands and warning (including error) messages in a gist at the bottom.
I suspect two things may cause the failure of the setting up.
when running curl -o- -L https://yarnpkg.com/install.sh | bash -s, I got warning message saying it is advised to not mix npm with yarn. However, I have not yet found out a way to separate them.
when running yarn, I got a lot of warning message saying the versions of packages are not matching, a lot of error messages for failing to run commands which I suspect to be the result of unmet packages but I can be wrong about it.
or what do you think the problem is?
could you give me some guidance on how to resolve this setting up problem? Thanks
please see the warning and error messages here in the gist.
https://gist.github.com/EmbraceLife/f84993112c5b4a894c30b0a4ba4bb4fc
it is advised to not mix npm with yarn
...in a single project. If you follow the instructions of cloning a clean repository and running yarn install inside, you should be fine.
I got a lot of warning message saying the versions of packages are not matching
I get these too, so I don't think anything is wrong on your end.
warning " > react-redux#5.0.7" has unmet peer dependency "redux#^2.0.0 || ^3.0.0 || ^4.0.0-0".
warning "devtools-launchpad > svg-inline-react#3.0.0" has incorrect peer dependency "react#^0.14.0 || ^15.0.0".
warning "devtools-launchpad > url-loader#0.5.9" has unmet peer dependency "file-loader#*".
warning " > eslint-plugin-mozilla#1.2.1" has unmet peer dependency "eslint-plugin-no-unsanitized#^3.0.0".
warning "devtools-reps > devtools-components > #storybook/react#3.4.8" has unmet peer dependency "babel-core#^6.26.0 || ^7.0.0-0".
warning "devtools-reps > devtools-components > #storybook/react#3.4.8" has unmet peer dependency "babel-runtime#>=6.0.0".
warning " > babel-jest#23.6.0" has unmet peer dependency "babel-core#^6.0.0 || ^7.0.0-0".
node-pre-gyp WARN Pre-built binaries not found for fsevents#1.2.4 and node#12.9.1 (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
followed by a large number of build errors, ending with:
30 warnings and 14 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
...looks like a problem with your running node12 (the CI seems to be running with node10) but I'm not even sure lack of fsevents is fatal...
Listening for WS on localhost:8116, all traffic is proxied to localhost:6080
TCP connection failed: Error: connect ECONNREFUSED 127.0.0.1:6080
These messages in your output are expected - you're supposed to run a controlled instance of the browser that listens on port 6080, until you do the "launcher" page tries to connect and fails repeatedly.
Apart from the console messages, is there a problem or does the debugger work?

NativeScript CLI installation Error

I am trying to learn NativeScript. I have done following steps to install NativeScript on my windows 8.1 Pro 64 bit machine:
Installed node.js (node-v8.11.2-x64) on D drive
Installed Visual Studio Code (VSCodeSetup-x64-1.23.1) on D drive
Installed Git (Git-2.17.0-64-bit) on D drive
Installed Android Studio (android-studio-ide-173.4720617-windows) on D drive
Installed NativeScript by using following command: npm install -g nativescript.
I receive following error on step 5:
C:\Users\UserName>npm install -g nativescript
nativescript#4.0.1 preuninstall C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript
node preuninstall.js
Failed to complete all pre-uninstall steps.
C:\Users\UserName\AppData\Roaming\npm\tns -> C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript\bin\tns
C:\Users\UserName\AppData\Roaming\npm\nativescript -> C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript\bin\tns
> nativescript#4.0.1 postinstall C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript
> node postinstall.js
RangeError: Maximum call stack size exceeded
at normalizeStringWin32 (path.js:33:30)
at Object.resolve (path.js:328:20)
at sync (C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript\node_modules\mkdirp\index.js:68:14)
at sync (C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript\node_modules\mkdirp\index.js:77:24)
at sync (C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript\node_modules\mkdirp\index.js:78:17)
at sync (C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript\node_modules\mkdirp\index.js:78:17)
at sync (C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript\node_modules\mkdirp\index.js:78:17)
at sync (C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript\node_modules\mkdirp\index.js:78:17)
at sync (C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript\node_modules\mkdirp\index.js:78:17)
at sync (C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript\node_modules\mkdirp\index.js:78:17)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.3 (node_modules\nativescript\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ nativescript#4.0.1
updated 1 package in 18.244s
When I run tns doctor command I receive following information:
> C:\Users\UserName>tns doctor
>
> RangeError: Maximum call stack size exceeded
>
> at normalizeStringWin32 (path.js:33:30)
>
> at Object.resolve (path.js:328:20)
>
> at sync (C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript\node_modules\mkdirp\index.js:68:14)
>
> at sync (C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript\node_modules\mkdirp\index.js:77:24)
>
> at sync (C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript\node_modules\mkdirp\index.js:78:17)
>
> at sync (C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript\node_modules\mkdirp\index.js:78:17)
>
> at sync (C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript\node_modules\mkdirp\index.js:78:17)
>
> at sync (C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript\node_modules\mkdirp\index.js:78:17)
>
> at sync (C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript\node_modules\mkdirp\index.js:78:17)
>
> at sync (C:\Users\UserName\AppData\Roaming\npm\node_modules\nativescript\node_modules\mkdirp\index.js:78:17)
I also tried to uninstall NativeScript but it gets stuck on still resolveWithNewModule, see below:
C:\Users\UserName>npm uninstall -g nativescript
[ ................] / loadDep:readdirp: sill resolveWithNewModule xcode#0.8.0 checking installable status
My questions are:
How to fix installation error for NativeScript?
If I need to uninstall NativeScript, how can I do that?
Which directory NativeScript gets installed with the installed command and can I install it on d drive?
It looks like the installation process is running out of memory.
Try running this command before running the installation:
node --max-old-space-size=8192
Set the last number according to RAM installed on your machine (2048, 4096 ecc)
#Aaron Ullal is right, the reason is mostly NodeJS heap (memory usage in V8) is running out of usable memory, is not because you have no ram left, this is a hard stop included in node exec config.
you can add a flag to increase the heap size on the go
NODE_OPTIONS="--max-old-space-size=4096" node
You can find more information here.
Please use the search tool to find similar errors or answered questions

Resources