Long story short, I got very very old RN IOS project (dependency list can show you how old) which works on only one company macbook. Thing is that this macbook has already some problems and I wished to install everything on my current mac, Unfortunately it throws many errors and I don't really know what to do with them. Project works on previous mac with XCode 12.5, I installed same version here just to make sure, also node v8.17.0 is used in previous mac so I used nvm to get same version.
Package.json
dependencies": {
"react": "^16.4.1",
"react-dom": "^16.4.2",
"react-native": "0.56",
"react-native-axios": "^0.17.1",
"react-native-barcode-builder": "^1.0.5",
"react-native-ble-manager": "^6.5.1",
"react-native-bluetooth-status": "^1.3.0",
"react-native-canvas": "^0.1.23",
"react-native-color-matrix-image-filters": "^5.2.0",
"react-native-cookies": "^3.3.0",
"react-native-linear-gradient": "^2.4.2",
"react-native-pulse": "^1.0.6",
"react-native-restart": "0.0.7",
"react-native-safari-view": "^2.1.0",
"react-native-side-menu": "^1.1.3",
"react-native-splash-screen": "^3.1.1",
"react-native-vector-icons": "^5.0.0"
},
So i go clone, np install and then npx react-native start, try to launch it in XCode and then build fails with:
'React/RCTBridgeModule.h' file not found in several libraries. As far as I can see in "Build Phases" > "Link binary with Libraries" they are there
EDIT
Ok I tried to take approach signed as a answer from link in comments, it went a bit further but now it crash on:
Showing Recent Messages
Build input file cannot be found: '../node_modules/react-native/third-party/glog-0.3.4/src/vlog_is_on.cc'
Showing Recent Messages
Build input file cannot be found: '../node_modules/react-native/third-party/glog-0.3.4/src/utilities.cc'
Showing Recent Messages
Build input file cannot be found: '../node_modules/react-native/third-party/glog-0.3.4/src/logging.cc'
Showing Recent Messages
Build input file cannot be found: '../node_modules/react-native/third-party/glog-0.3.4/src/symbolize.cc'
I managed to make it works! Thanks for comment it really helped me to move first step which was the hardest, so basically what I had to do, maybe it will be useful for someone who tries to launch some old project:
In XCode goes to Build Phases, manually unlink all external libraries and then re-add them again
Move React.xcodeproj from libraries to root folder and then in Build Phases => dependency > add React
Goes with the link from comment and disable "Parallelize Build"
Proceed with this link in case of glog error => https://github.com/facebook/react-native/issues/14382 (here I a bit messed up with several answers but moreless I did this yarn cache clean rm -rf node_modules yarn install and then this => https://github.com/facebook/react-native/issues/14382#issuecomment-405472763 and https://github.com/facebook/react-native/issues/14382#issuecomment-422755411)
Then in case of RCTBridge error I go with this answer => https://github.com/facebook/react-native/issues/31412#issuecomment-872032401
And in the end when app was succesfuly build but crash on launch I went with Solution number 2 from this link => https://blog.cpming.top/p/rn-error-unknown-argument-type-attribute-in-method
Related
After adding a package (Kingfisher) to my Xcode project, I noticed the following error when building:
I am not sure why I am getting this error, because from what I can tell the package was added correctly. I've verified that in the Targets > Frameworks section I see the package Kingfisher listed:
I've also verified that in the Project > Package Dependencies section, I see the package listed:
Furthermore, I even tried to just remove the dependency on this package altogether by removing it from both the Targets > Frameworks section using the "-" button, and I did so as well in the Project > Package Dependencies section. However even after removing it from both of these places I still get the same error when trying to build, which was very surprising.
I'm new to xcode so any help/tips would be appreciated
The problem might as well be in some cached data that still dwell in DerivedData. Try deleting DerivedData for your project and then reinstantiate package again. Also clean build folder with Cmd + Shift + K You can open your DerivedData folder in finder window directly through Xcode by navigating to: Xcode -> Preferences -> Location and clicking on the small arrow next to DerivedData directory.
Xcode isn't totally happy with my Package.swift file.
This is the line with an issue;
.package(name: "Utilities", url: "file:///Users/Alexander/Development/MMXX/Repositories/Utilities", from: Version("1.0.0"))
The package is a local package I have created, and is in use for a few other apps, so I know it is a valid package and its location is correct.
The Version 1.0.0 is "made up" in the sense that I haven't declared a version anywhere and didn't know what else to put there. It was the only thing I tried that Xcode was able to parse successfully -- it parsed the information, it just can't match it to my local repository.
The package was created using Xcode, and I didn't issue any commands to make it a git repository. Do I need to update my app's plist to allow disk access to a folder outside the app's sandbox?
Any pointers what else I can try would be most appreciated! Thanks.
Here is what finally worked:
in the dependencies: section
.package(path: "../Utilities")
in the targets: section
.product(name: "Utilities", package: "Utilities")
Edit:
I ran into this problem again. I dragged the package folder into the active project and it loaded the referenced libraries. But it wouldn't compile (couldn't find the new package).
Make sure you select the target and navigate to "Frameworks, Libraries and Embedded Content", click on the "+" and add the package:
Current Behavior
I am building my angular project on circleci and it just keeps failing with the following message:
An unhandled exception occurred: Cannot find module
'#babel/compat-data/corejs3-shipped-proposals'
Require stack:
/home/circleci/eleven-app/frontend/node_modules/#angular-devkit/build-angular/node_modules/#babel/preset-env/lib/polyfills/corejs3/usage-plugin.js
/home/circleci/eleven-app/frontend/node_modules/#angular-devkit/build-angular/node_modules/#babel/preset-env/lib/index.js
/home/circleci/eleven-app/frontend/node_modules/#angular-devkit/build-angular/node_modules/#babel/core/lib/config/files/plugins.js
/home/circleci/eleven-app/frontend/node_modules/#angular-devkit/build-angular/node_modules/#babel/core/lib/config/files/index.js
/home/circleci/eleven-app/frontend/node_modules/#angular-devkit/build-angular/node_modules/#babel/core/lib/index.js
/home/circleci/eleven-app/frontend/node_modules/#angular-devkit/build-angular/src/utils/process-bundle.js
/home/circleci/eleven-app/frontend/node_modules/jest-worker/build/workers/processChild.js
I am using
{
"#babel/plugin-proposal-numeric-separator": "^7.8.3",
"core-js": "3.2.1",
"tslib": "^1.11.1",
"#babel/compat-data": "~7.8.0",
"#babel/runtime-corejs3": "^7.9.2",
"ts-node": "7.0.0",
"tslint": "5.11.0",
"typescript": "3.5.3",
}
resolutions: {
"#babel/preset-env": "^7.8.7"
}
here is npx nls why #babel/preset-env output:
eleven-app-frontend > #angular-devkit/build-angular > #babel/preset-env#7.8.7
eleven-app-frontend > #nrwl/angular > #nrwl/cypress > #cypress/webpack-preprocessor > #babel/preset-env#7.9.5
eleven-app-frontend > #nrwl/cypress > #cypress/webpack-preprocessor > #babel/preset-env#7.9.5
Thank you for reading.
Had the same issue today, so I'm assuming there's something weird with the latest version.
My package.json had the following:
"#babel/compat-data": "~7.9.0"
I removed the ~ to force 7.9.0 instead of allowing newer ones and it did the trick for me.
There's probably a newer version that works but since you opened an issue for them (https://github.com/babel/babel/issues/11427) I'll just wait for more details.
I've the same issue when using TravisCI & Vue with Jest and Babel. My test suit has been failing. Adding "#babel/compat-data": "7.9.0" to devDependencies in my package.json file solved my problems.
These 3 options we came up with so far:
Adapt dependency of babel/preset-env to v7.9.0: "#babel/preset-env": "=7.9.0"
In case you use a NodeJS Docker Image, fix the version to something below 13.13, i.e.: node:13.12.0-alpine
Adding or upgrading "#babel/compat-data": "7.9.0" to devDependencies
The solutions are temporarily and should be removed as soon as there is an actual fix of the node images or the babel/preset-env library.
Linked Github issues:
babel - https://github.com/babel/babel/issues/11427
nodejs - https://github.com/nodejs/node/issues/32852#issuecomment-613652057
I had the same issue today in Github Actions build for a Vue FE project. It builds fine locally. I'm going to try the solution above and I'll report back...
Update: After looking through the package-lock file, my solution was to explicitly add "#babel/compat-data" to the prod dependencies. Previously it was only a dependency for some dev dependencies. So my package.json now looks like:
"dependencies": {
"#babel/compat-data": "^7.8.6",
...
Same issue.
Solved it by following above advices + removing node_modules (see this github thread):
Added explicitly #babel/compat-data": "7.9.0" to devDependencies
Upgraded node (13.3 to 14.0 in my case)
Had to remove my node_modules folder and re run yarn (or npm)
If you're using yarn, try to remove the yarn.lock file in your project. And then reinstall by run yarn install; you'll get a new yarn.lock file, which is fine.
It worked for me in my Next.js project.
I'd like to be able to build Scala applications in Sublime Text 3 on Mac 10.9.3. I have Scala 2.11.1 and sbt 0.13.5 installed and they all work fine. I installed them by homebrew.
However, I can't seem to find how to create a build system for Scala projects. For example, this one doesn't work:
{
"cmd": ["sbt", "test"],
"selector": "source.scala",
"working_dir": "${project_path}"
}
I found a couple of different ones as well but they didn't work for me, either. Your thoughts?
UPDATE:
[Errno 2] No such file or directory: 'sbt'
[cmd: ['sbt', 'test']]
[dir: /Users/alex/Documents/projects/scala/dir1]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
[Finished]
UPDATE2:
{
"cmd": ["/usr/local/bin/sbt", "test"],
"selector": "source.scala",
"working_dir": "${project_path}"
}
An app:
class MainTest extends App {
println("Hellowa!")
}
The output:
[0m[[0minfo[0m] [0mSet current project to scala (in build file:/Users/alex/Documents/projects/scala/)[0m
[0m[[0minfo[0m] [0mCompiling 1 Scala source to /Users/alex/Documents/projects/scala/target/scala-2.10/classes...[0m
[0m[[32msuccess[0m] [0mTotal time: 4 s, completed Jun 16, 2014 4:51:38 PM[0m
[Finished in 7.2s]
Homebrew installs executables in /usr/local/bin, but the error text you have now provided shows that that directory isn't in your path.
Two ways you could fix it:
1) Change "cmd": ["sbt", "test"], to "cmd": ["/usr/local/bin/sbt", "test"],
2) Add /usr/local/bin to your PATH environment variable. Note that you'll need to do this in such a way that GUI apps like Sublime Text notice the change; see e.g. Setting environment variables in OS X? for details
Could SublimeSBT that's "Scala SBT build tool integration for Sublime Text 2 and Sublime Text 3." be a solution?
Why wouldn't you :D I am using SublimeSBT for quite some time, and the only complexity it's invoking cmd+shift+p followed by sbt start continuous testing. I would advice you to give SBTSublime a try before baking your own build system.
Personally I use SublimeREPL that support SBT. SublimeREPL allows you to launch SBT from Sublime. This avoided me to download another package, cause I already used SublimeSBT for python. I wanted a minimal configuration to code in scala, because my IDE was to slow. I first try to use my on build system but end up using SBT. The SBT offers great advantages in comparaison to other way of building your project.
First it compiles only files that need to (those who have been modified, and those who depend on them).
Second it's very handy for importing library. One line into your build.sbt file allows you to import library from github (usually this line is explicited on the github main page).
And third you can compile on every save, with the command "~compile", or "~; compile; runMain 'mainclass' "
I find the later pretty useful as it is often long to compile with scala. I often start to add a simple function, save, and while it's compiling I improve my first draw.
The main constraint is you have to put your code in src/main/scala or src/main/java if you have some Java files too, and you have to open the whole root directory with sublime.
Windows only!
If you already add the bin folder to the PATH variable:
{
"cmd": ["sbt.bat", "test"],
"selector": "source.scala",
"working_dir": "${project_path}"
}
My developer friend who has the luxury of developing in a non-Windows environment has been raving about Compass. I finally decided I wanted to give it a try. I'm tired of trying to keep up with all of the intricacies of cross-browser CSS.
So, I found it on NuGet, and installed it.
I installs to my solutions root directory in the packages directory:
$(SolutionDir)packages\Ruby.Compass.0.12.2.3\
It comes with a Readme that states the following message:
Ruby Compass v. 0.12.2
Compass is installed in its own NuGet package dir, and available by
'compass' command in "packages\Ruby.Compass.0.12.2.3" folder.
To compile Compass files during build, add the next line to the
project pre-build events:
"$(SolutionDir)packages\Ruby.Compass.0.12.2.3\compass" compile
"$(ProjectDir)."
So, I placed the line in my pre-build events, saved, and tried to build my project. However, I get an error as follows:
The command
""$(SolutionDir)packages\Ruby.Compass.0.12.2.3\compass" compile "$(ProjectDir)."" exited with code 1.
Notice: It actually shows the full path to the ProjectDir and SolutionDir as it's supposed too in the error message. I replaced them with the tokens to keep the project name unanimous.
Let me mention that I tried variations of the suggestion pre-build line:
"$(SolutionDir)packages\Ruby.Compass.0.12.2.3\compass" compile "$(ProjectDir)"
"$(SolutionDir)packages\Ruby.Compass.0.12.2.3\compass" compile "$(ProjectDir)css"
"$(SolutionDir)packages\Ruby.Compass.0.12.2.3\compass" compile "$(ProjectDir)css\test.scss"
The first one just removed that trailing .. The second one pointed it to the directory where all my css files are stored. The third one pointed it to the exact file I was trying to compile was located.
I opened up compass.cmd which is the file it is calling, and it looks like the following:
#echo off
"%~dp0ruby\bin\compass" %*
I'm assuming this calls the compass file in the ruby/bin folder, which looks like this:
#!C:/downloads/ruby-2.0.0-p247-x64-mingw32/ruby-2.0.0-p247-x64-mingw32/bin/ruby.exe
#
# This file was generated by RubyGems.
#
# The application 'compass' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'rubygems'
version = ">= 0"
if ARGV.first
str = ARGV.first
str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
if str =~ /\A_(.*)_\z/
version = $1
ARGV.shift
end
end
gem 'compass', version
load Gem.bin_path('compass', 'compass', version)
From there, I'm not sure what is going on. I'm not a Ruby person.
Is there an issue that I'm overlooking here?
Has anyone else been able to install Ruby.Compass via NuGet?
How can I get this working in Visual Studio without having to fight with Ruby?
From: http://codewith.us/automating-css-generation-in-visual-studio-using-sasscompass/
"Note that, if there are issues with your SCSS files, you will receive some variation of the error below.
Error 36 The command "del "C:Projectspubliccss*.css" /S
compass compile "C:Projectspublic" --force" exited with code 1.
Open your Output window (click View -> Output or press Ctrl+W, O), and select “Build” in the “Show output from:” menu. Scroll up until you find your command in the log and you should get a little more insight into what portion of the command failed."