set electron config values in yarn v3 - electron

I'm trying to migrate my electron project from yarn v1 to yarn v3. As we use native modules, we have had to set a handful of values in the .yarnrc file as documented in electron docs:
arch x64
disturl "https://electronjs.org/headers"
fallback_to_build "true"
runtime electron
target "9.4.4"
target_arch x64
This has been working for us for years under yarn v1. When trying to migrate to yarn v3, I'm at an impasse as when trying to set these under .yarnrc.yml I get an error on running any yarn command complaining about the custom key/values, and there doesn't seem to be a documented way to accomplish this. I've tried also using the NPM_CONFIG_* to set these, but that also didn't set these. Without them, installation predictably fails.

Related

Yarn requires Node.js 4.0 or higher to be installed. - Symfony - Docker - Yarn

I'm trying to install yarn in my symfony project, but did not succeed yet.
I installed nodejs and all needed requirements on windows. When I type node -v or yarn -v inside a windows cmd, it displays versions for the respective tools as expected.
But in my symfony project inside the container, it seems like the node and yarn commands can't be found.
Here is a screentshot of my Directory
When I type yarn -v or yarn install it gives the following error:
Yarn requires Node.js 4.0 or higher to be installed.
I don't know how to fix this error. Can someone point me in the right direction?
Yarn requires Node.js 4.0 or higher to be installed.
Currently working on Windows 8.1 and first had this issue recently when working with Gatsby and also with Rails, this issue persisted even though everything was up to date, what worked for both instances was running the CMD Line in the project directory as Administrator, then running yarn commands.
Seems to only work in the CMD Line, this was just a hunch and it worked.
Sure there is a reference but couldn't find it in the Documentation to prove the above, if anyone in future comes across the Docs, kindly link it to this post.

Installation with Create React App

I'm sorry for asking what may be an obvious question to most, but I'm lost. I have created a react project with create-react-app. I want to add a third party library (Ant Design UI Framework) that uses .css styles. Ant will use global .css and the rest of my application can then use styleName.
After running npm install babel-plugin-react-css-modules --save what do I have to do to get this running? The documentation references the configuration but the individual steps required properly configure the app aren't clear at all—at least to me.
Can someone help with a bit of an "idiot's guide" to setting this up, and detail some of the steps?
Thanks,
Chris
Ant Design also have react native library as you can see here
You just need to run the following command on your project root to install it:
$ npm install antd-mobile --save

How to write an Electron app with Hyper?

I was wondering, how can I start to write an Electron app using the Hyper.js sources?
I am new to both Electron and Hyper, and watched a few videos on building an Electron app. But I can't quite figure out how to start the Hyper app. For instance, which is the "main" file in the sources?
Alright, after more reading and getting familiar with Node.js and Electron apps, the following procedure works:
git clone https://github.com/zeit/hyper
cd hyper
npm install
A lot of packages will be installed in a subdirectory called node_modules, then:
yarn run dev
And (in a separate terminal window):
yarn rup app
This will open an Electron app similar to the original one built by Hyper.

How to make CircleCI call npm install on two places?

I have just started working with CircleCI so I don't know whether this is too obvious.
Problem is, that I have react website and react native project in one folder. React website uses project/package.json and project/node_modules, while React Native project uses project/nativeApp/package.json and project/nativeApp/node_modules.
To make both run and test correctly, I need to npm install in both locations. How do I tell CircleCI to do that?

ionic build ios fails with "[TypeError: Arguments to path.join must be strings]"

I am trying to create an ionic app on Mac.
I followed the instructions on ionic's website to create a basic app and was able to run it in the browser but when I run "ionic build ios" I get following error. I cannot find a log file or any other error to debug this. How do I go about fixing this?
Check your Gulp version and gulpfile.js. You may need to remove the calls to gulp.src
See:
Gulp TypeError: Arguments to path.join must be strings
and
https://github.com/sindresorhus/gulp-ruby-sass/issues/191
ok, after lot of looking and searching I figured my npm install was messed up.
Part of my installs were in /usr/local and few of them were in /User/user.name/npm folders. /Users/user.name/npm was set in the npm config prefix.
I had two installs of cordova, one on each folder above. Some how the cordova from /usr/local was getting used to create the project and that was the old version.
To fix the problem, I uninstalled all my global npm installs and pointed my npm config prefix to /usr/local and gave myself execute permission on that folder. Everything is working now.
Here is the video that explains how to do it: https://docs.npmjs.com/getting-started/fixing-npm-permissions

Resources