I want to install Stencil-CLI for BigCommerce and got this error list:
Command failed: git submodule update -q --init --recursive
I'm using node version 12.22.9 (I've also tried version 22.7 and 22.8, but the issue was present there too); nvm version is 0.36.0.
Reinstalling nvm and/or node didn't help.
To solve this problem, just wait for response from git repo, and then it will fix itself (I just went home, and the next day I just ran this command again)
Related
I have Node.js version 14.18.1 installed and I want to update to 16.10.0 for compatibility for a project. To upgrade I have installed the latest version of nvm (1.1.8) and did nvm install 16.10.0. And then nvm use 16.10.0 and got the error: exit status 145: The directory is not empty. I tried looking this up, but couldn't find anyone on the internet encountering the same issue.
I have also tried adding the path at C:\Users\*user*\AppData\Roaming\nvm\settings.txt to my system environment path, but that didn't work either. Does anyone have an idea as to what might work? Thank you.
I solved by:
Delete all contents of folder path: C:\Program Files\nodejs
and try to run nvm use 16.10.0 again.
I am trying to update an Angular project (in version 8) to version 9. when running the ng update it gives an error saying
Migration failed: Could not find any tsconfig file. Cannot migrate dynamic queries.
after some time. but when check the version it shows as 9. but many required changes are not there.
any solution or workaround is appreciated.
It says cannot migrate to dynamic queries please try the below code
npx #angular/cli#9 update #angular/core#9 #angular/cli#9 --force
I got the same error upgrading from angular 8 to 9.
I had a tsconfig file in my project and it was linked well.
In my case the error was caused by the #angular-devkit/schematics package.
I resolved the error by the following steps:
remove the package #angular-devkit/schematics from your package.json
delete the node_modules and package-lock.json
npm i (I need to execute npm i --legacy-peer-deps - but be careful with that)
npx #angular/cli#9 update #angular/core#9 #angular/cli#9
Let me now if this worked. Hope this might help someone
In order to run the migrations you need to install the #angular-devkit/core package
npm i #angular-devkit/core#<VERSION> -D
ng update --from <FROM_VERSION> --to <VERSION> --migrate-only --allow-dirty --verbose #angular/core
After migrations you could remove the package again.
When I was hit with this error. All I had to do was, run; 'ng update'. I was given the suggestion what to do next. Attached for reference below;
In my case I had to run as suggested; 'ng update #angular/core#12'
✖ Migration failed: Could not find any tsconfig file. Cannot migrate AbstractControl.parent accesses.
See "/private/var/folders/s/C/K/angular-errors.log" for further details.
app_code % ng update
Using package manager: 'npm'
Collecting installed dependencies...
Found 29 dependencies.
We analyzed your package.json, there are some packages to update:
Name Version Command to update
--------------------------------------------------------------------------------
#angular/core 11.2.14 -> 12.2.9 **ng update #angular/core#12**
For me the issue was my version of node. v12.22.12 worked for me.
Weirdly, the react-native-vector-icons was working well but by using ^ ("^6.6.0") for its version in the package.json file on the new release this error happens.
It's weird because two days ago it works well but now starting of my project ran to this error:
error: Error: Unable to resolve module #react-native-community/toolbar-android from node_modules\react-native-vector-icons\lib\toolbar-android.js: #react-native-community/toolbar-android could not be found within the project.
After reading this issue and trying many solutions I reach to two solutions:
You can delete all node_modules folder and put the version of react-native-vector-icons to "6.6.0" instead of "^6.6.0" and then install all packages again. absolutely, it is better to delete all caches and builds and start everything again. (NOT Recommended)
You can install the #react-native-community/toolbar-android by using the below command:
yarn add #react-native-community/toolbar-android
Or
npm install --save #react-native-community/toolbar-android
Note: Both of these solutions are temporary and soonly this bug will be fixed and there is no need to install the toolbar-android package.
Prev Update
I update the package to the version "^7.0.0" on my project and still, the issue is remaining, so this solution is currently perseverance.
New Update
this issue is fixed on version "^7.1.0" and there is no need to install the #react-native-community/toolbar-android.
Update the library
react-native-vector-icons
to the latest version.
I had this problem too.
In my case, only works when I removed and added the package again with the latest version (7.0.0).
yarn remove react-native-vector-icons
yarn add react-native-vector-icons
Had this EXACT same error. All I had to do was install toolbar-android & voilà!
npm install --save #react-native-community/toolbar-android
Go the path \node_modules\native-base\node_modules\react-native-vector-icons\lib\toolbar-android.js
Replace import ToolbarAndroid from '#react-native-community/toolbar-android' to import {ToolbarAndroid} from './react-native';
I also got the same error after upgrading from version 6 to 7. The issue can be fixed simply by resetting the cache.
Please try npm start -- --reset-cache
do this:
rm -rf node_modules/
rm -rf package.lock.json
npm i
react-native start --reset-cache
from your project directory:)
Just Import it direct from react native it solves my problem
node_modules\react-native-vector-icons\lib\toolbar-android.js
import { ToolbarAndroid } from 'react-native';
Same issue, I solved it:
My environment:
RN: 0.61.5
Node: v12.18.3
OS: Windows 10 Pro
You can install react-native-vector-icons latest version (current 7.0.0).
And do not run auto-link (react-native link react-native-vector-icons)
Finally, running react-native start --reset-cache
Good luck.
First let's understand the standard convention used in package.json for packege's version.
So if you see ~1.0.2 it means to install version 1.0.2 or the latest patch version such as 1.0.4. If you see ^1.0.2 it means to install version 1.0.2 or the latest minor or patch version such as 1.1.0.
Now, coming to the issue.
The issue is caused because you are having a version of react-native-vector-icons which is giving you some trouble.
Check it's version by this command under your project directory:
npm list react-native-vector-icons --version \ is it 6.6.0 ??
No ?? . There is the problem. You need strictly 6.6.0 but you got something else.
Solution:
Delete node_modules directory under your project. Change the version of react-native-vector-icons in package.json to 6.6.0 (basically remove ^ to tell npm to get me exactly what I want. Nothing more, nothing less !)
Then do npm install !
The other alternative is to use expo's vector Icons. Something like this.
import { Ionicons } from "#expo/vector-icons".
Then render your Icon like this;
<Ionicons
name="ios-exit-outline"
color={colors.danger}
size={28}
style={{ marginRight: -15 }}
/>
Edit this file node_modules\react-native-vector-icons\lib\toolbar-android.js
remove 'import ToolbarAndroid from '#react-native-community/toolbar-android';'
edit return null
for this case you have not toolbar-android in your modules file and as friends saying you can fix it by this command
windows users:
npm install --save #react-native-community/toolbar-android
Mac users:
yarn add #react-native-community/toolbar-android
But IN GENERAL: I wanna tell you an experience for you guys whenever you encounter with this kind of errors that start with "Unable to resolve module" .
if you have a look to the error we have a problem with the module that system is telling us.
if you have not that module . you can install it with the commands
Windows users:
npm install --save THE MODULE(attention: THE MODULE IS THE NAME OF PACKAGES OR MODULES that u need to install)
and Mac users:
yarn add THE MODULE(attention: THE MODULE IS THE NAME OF PACKAGES OR MODULES that u need to install)
for example lets look at this error:
error Unable to resolve module `#react-native-community/slider` from `App.js`: #react-native-community/slider could not be found within the project.
as you can see error is telling us this module could not be found within our project.
so we need install it with this command:
for windows programmers:
npm install --save #react-native-community/slider
and for mac programmers:
yarn add #react-native-community/slider
that's all.
I hope you understand me clearly and do not have problem with unable to resolve module errors and my command be useful for you.
best regards
Mehrad Karampour (MEH)
I'm beginner of React native developer.
After create new project then open it.
xcode is display error config.h file not found in mutex.h file. I'm also search in google and try possible solution but still display same error.
I'm done Following Commands
1
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2
brew install watchman
3
npm install -g react-native-cli
4
react-native init projectName
5
cd projectName
react-native start
6
react-native run-ios
Error in CMD
./Desktop/Demo React Native/projectName/node_modules/react-native/React/../third-party/glog-0.3.4/src/base/mutex.h:105:10: fatal error: 'config.h' file not found
include "config.h" // to figure out pthreads support
1 error generated.
Software Version List
Homebrew 1.6.8
react-native-cli: 2.0.1
react-native: 0.55
watchman 4.9.0
npm 6.1.0
I'm also try this soluation but still error
In the Terminal, navigate to the third-party/glog and config glog file
cd node_modules/react-native/third-party/glog-0.3.4
./../scripts/ios-configure-glog.sh
I got it fixed by following this steps:
Close Xcode.
cd <Project-Folder>/node_modules/react-native/third-party/glog-0.3.4
Run ./configure
Run make
Run make install
Open Xcode and try building the Project.
Hope this solves the issue
Solution:
yarn upgrade log
Upgrade to v1.6.0 successful. iOS build successful.
Note: Rebuilding glog did did not work for me. Build failed.
I will add another answer to this issue since it was driving me crazy this week...
$ cd ./node_modules/react-native && scripts/ios-install-third-party.sh && cd third-party && cd $(ls | grep 'glog' | awk '{print $1}') && ./configure
The steps needed to manually configure glog (like samridhgupta his accepted answer or the command I wrote here just above) worked for me, but only the first time I build the project. On every single build I had to go to the same process so I needed a more stable solution.
I appears Xcode is executing ios-install-third-party.sh on every build, which means it will also execute ios-configure-glog.sh every single time. So my solution is to just build a single time, and then comment out the glog install step in the ios-install-third-party script.
If anyone is facing this same issue, it is the line below you need to remove or comment out (ios-install-third-party can be found in /node_modules/react-native/scripts).
fetch_and_unpack glog-0.3.5.tar.gz https://github.com/google/glog/archive/v0.3.5.tar.gz 61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc "\"$SCRIPTDIR/ios-configure-glog.sh\""
If any of these solution does not work, please check your project path. Project path - directory names should not contain any space in its name or you can create project on Desktop or in Documents directory.
Run following commands in project directory.Helped me resolve my config.h not found issue
cd node_modules/react-native/third-party/glog-0.3.4/
./configure
make
make install
cd ../../../..
react-native run-ios
Add this fix script into package.json
"scripts": {
"fix": "cd node_modules/react-native/third-party/glog-0.3.4 && ./configure && make && make install"
},
Then run yarn fix or npm run fix and then try building the Project
My problem was comming from using react-native#0.53.0, which I suppose has trouble with new Xcode version.
1 - Change react-native version in package.json
"react-native": "0.53.0",
to
"react-native": "0.56.0",
2 - Remove node_modules folder
$ rm -rf node_modules/
3 - Reinstall modules:
$ yarn install
What worked for me:
yarn cache clean
rm -rf node_modules
yarn install
I have tried setting up Angular 2 to experiment with on my VPS. The needed steps are here:
https://angular.io/docs/js/latest/quickstart.html
The first command is successful:
$ npm install -g tsd#^0.6.0
But the second step causes an error:
tsd install angular2 es6-promise rx rx-lite
"/usr/bin/env: node: No such file or directory" is the error I get. I have tried installing this in my project folder as root, but that also didn't had success. Does someone know why I get this error? The command doesn't exist, but why not?
Is there an easier way to install this? I have seen "npm install angular2", but I don't know how that works, that's why I tried the steps
You may need to make a symbolic link to node:
ln -s /usr/bin/nodejs /usr/bin/node
(see https://stackoverflow.com/a/26320915/2033574)