Can't run Gatsby develop on existing project on Mac M1 - arm

When running Gatsby develop on a project, it doesn't run. This is everything I get: (not very verbose)
my-project [master●] % gatsby develop
success open and validate gatsby-configs - 0.052s
⠋ load plugins
[1] 77411 killed gatsby develop
For context, the project was developed on an older Mac and runs without problems there (or on two other peoples' non-M1 macs). Installing and running a new Gatsby site is seamless.
Previously I had trouble getting this project to run, when running npm install, which I was able to fix by reinstalling brew vips and xcode-select.
But this doesn't throw an error... so I have no idea what's going on.
I tried installing vscode insiders, but no luck there.
Any clues as to what's happening?

same issue here.
I ended up re-installing brew and that made the trick.

The flow which i tried got worked for me, also i had posted you the configuration which i had previously.
brew reinstall vips
xcode-select --install
brew install gcc
brew reinstall vips
brew info vips
npm i
System Informations:
Gatsby CLI version: 4.0.0
Gatsby version: 3.14.6
Node version: v14.18.0
NPM version: 6.14.15

Related

Error: "createRequire is not a function Referenced from: BaseConfig"

I have a freshly cloned repo created from the create-react-app template. I npm install to install the packages and then npm start to serve the files on localhost:3000. My coworker (the repo creator) is not having any issues.
However, I see the page flash for a second and then I get the following error:
Failed to compile
createRequire is not a function
Referenced from: BaseConfig
The error message doesn't provide any other information to help trace which file it could be coming from.
I've tried the following to troubleshoot:
Deleting node_modules and package-lock.json and re-installing
Deleting the entire repo and re-cloning
Searching for 'createRequire' or 'BaseConfig' in project files found no results
Searching online for similar issues. None seem to have the same error I'm encountering.
Other details:
npm version 6.14.8
react version 17.0.1
Any idea where this error could be coming from or what steps I can do to trace it?
TL;DR Needed to upgrade node version
I tried npx create-react-app to confirm if the issue was with the template or with the project code. While doing that, I got a message that my package dependencies required a higher version of node (I was on v.10.4, the latest is v15.2.0).
Doing brew upgrade installed the latest version but didn't change the default node version across the system (ie: node -v still showed v10.4) but
doing nvm install --lts then nvm alias-default [latest-version] fixed my issue!
Some solutions are not worked for me. I uninstalled node.js and installed latest version. It worked!
It could be connected with eslint in create-react-app
try to reinstall 'eslint' or 'eslint-config-react-app'
https://github.com/AtomLinter/linter-eslint/issues/1351
BaseConfig is a variable of the create-react-app react-scripts module
in node_modules/react-scripts/config/webpack.config.js
formatter: require.resolve('react-dev-utils/eslintFormatter'),
eslintPath: require.resolve('eslint'),
resolvePluginsRelativeTo: __dirname,
// #remove-on-eject-begin
ignore: isExtendingEslintConfig,
baseConfig: isExtendingEslintConfig
? undefined
: {
extends: [require.resolve('eslint-config-react-app')],
For me, downgrade the react-scripts to latest 3.x version solved my problem. I could not update the NodeJS version, as I didn't have access to NodeJS server instance. Seems it fits better with React 16.x.
I'm running and building the app at NodeJS V10.0.0.
I am a noob, but I just came across this very same error message in picking up where I previously had left off following a MERN stack tutorial. During the break, I must have switched nvm versions, and thanks to this thread I was able to correct this. From the terminal, I simply ran nvm list. From the result, I could see that I was running an older version (10.9.0) but had a newer one (10.12.0) available to me, which I switched to by running nvm use 10.12.0. This resolved my issue.

React-native-reanimated: Unable to resolve "./useValue"

I am trying to build a react native app. I have caught an error on the terminal saying
Unable to resolve "./useValue" from "node_modules\react-native-reanimated\src\Animated.js"
I reinstalled react-native-reanimated to the expected version range.
`Some of your project's dependencies are not compatible with currently installed expo package version:
react-native-reanimated - expected version range: ~1.9.0 - actual version installed: ^1.10.1
Your project may not work correctly until you install the correct versions of the packages. To install the correct versions of these packages, please run: expo install [package-name ...]`
Thus, I run the code as follow: npm install react-native-reanimated#1.9.0, but still run into the error code.
I could realy use some help on this.
try uninstalling the package ==> close ide (all instances) ==> open the ide ==> install the package again ==> run "expo start -c"
Only do this:
expo start --clear
From Expo Documentation at Expo Start command.
--clear, -c | Clear the React Native Packager cache.

How do i downgrade expo and install a specific package?

Some of your project's dependencies are not compatible with currently installed expo package version:
- #react-native-community/netinfo - expected version range: 5.5.1 - actual version installed: ^5.8.0
Your project may not work correctly until you install the correct versions of the packages.
To install the correct versions of these packages, please run: expo install [package-name ...]
Im getting this above warning. is there any cli command to do install specific expo package? if yes then please provide it. Thanks.
Into your package.json file, update the version of #react-native-community/netinfo to the right one (5.5.1), and make a npm install again.
You can also provide the version by using the cli command :
npm i #react-native-community/netinfo#5.5.1

Doesn't work "npx create-react-app my-new-app --typescript"

Please help me. When I try to generate a project (creative-react-app), I get an error, you can look in the screenshot. The screen also shows the versions of node, npm and npx. I am using Linux Ubuntu 18.04.4 LTS.
Try to uninstall your nightly Node version and install the stable version of Node. In the error, it says that babel isn't compatible with your version of Node.
It also could be that you have an old version of React installed locally. So if the first fix doesn't work try
npm uninstall react

Ionic 2 - Can't generate pages via the CLI how to resolve error?

This may be just my lack of experience working with ionic 2 but I'm getting an error when tying to generate pages via the CLI.
The syntax I'm using: "ionic g page TestPage"
It returns an error (below). Does anyone know how to resolve this error? It seems the "templates" directory does not exist on my machine which I gather is why this is happening, but not sure how to get it there or fix the issue. The first part of the path does exist: C:\apps\sampleapp\node_modules\ionic-angular\, but not the "templates/page" part.
Error: ENOENT: no such file or directory, scandir 'C:\apps\sampleapp\node_modules\ionic-angular\templates\page'
at Error (native)
at Object.fs.readdirSync (fs.js:808:18)
at getTemplatesInDir (C:\Users\m411\AppData\Roaming\npm\node_modules\ionic\node_modules\#ionic\app-generator
at Generator.renderAndWriteTemplates (C:\Users\m411\AppData\Roaming\npm\node_modules\ionic\node_modules\#ion
at C:\Users\m411\AppData\Roaming\npm\node_modules\ionic\node_modules\#ionic\app-generators\index.js:25304:26
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.1.0-beta.1
Ionic App Lib Version: 2.1.0-beta.0
OS: Windows 8.1
Node Version: v4.5.0
Downgrade your ionic version to beta 22.. I think it works by uninstalling and then updating npm just in case and then reinstalling a lower ionic version.
How do you completely remove Ionic and Cordova installation from mac?
And I would suggest trying "npm install" in the project directory after this too.
Okay, for anyone where downgrading is not an option:
The Ionic Team did some major API updates and some restructuring.
You need to follow these upgrade steps:
Sidenote: If you did uninstall and reinstall the package AND did run the command with sudo and hit the command ionic start --v2 myApp in the same terminal, then you need to update the rights in your folder with:
sudo chown -R username ./pathToAppFolder
https://github.com/driftyco/ionic/blob/master/CHANGELOG.md#steps-to-upgrade-to-rc0
npm i -g ionic#2.0.0 - Solved the issue.
Thank you.
npm i -g ionic#2.0.0-beta.37
resolved the issue for me, was previously on ionic 2.0.0 beta 11

Resources