I installed Android Studio on Mac using brew install Caskroom/cask/android-studio
Then, I run yo gradle-kotlin, and got the following error. What can I do to make my first Hello World work?
Thank you
✔ /Volumes/Git/android/kotlin-hello-world
10:53 $ yo gradle-kotlin
_-----_
| | .--------------------------.
|--(o)--| | Welcome to the |
`---------´ | incredible Gradle+Kotlin |
( _´U`_ ) | generator! |
/___A___\ '--------------------------'
| ~ |
__'.___.'__
´ ` |° ´ Y `
Detecting installed Gradle version...
Fetching latest Kotlin version from Maven Central...
✔ Fetched latest Kotlin version: 1.0.1-2
✔ Detected installed Gradle version: 2.12
? What's your project name? kotlin hello world
? What Gradle version would you like to use? 2.12
? What Kotlin version would you like to use? 1.0.1-2
? Do you want to use Kotlin Reflection? Yes
? Would you like to use IDEA Gradle plugin? Yes
identical .gitignore
identical src/main/kotlin/.gitkeep
identical src/test/kotlin/.gitkeep
identical build.gradle
identical gradle.properties
identical settings.gradle
Executing 'gradle wrapper' command...
✔ Done executing 'gradle wrapper' command.
Executing Gradle tasks: idea build
internal/child_process.js:298
throw errnoException(err, 'spawn');
^
Error: spawn EACCES
at exports._errnoException (util.js:856:11)
at ChildProcess.spawn (internal/child_process.js:298:11)
at Object.exports.spawn (child_process.js:362:9)
at Function.spawn (/usr/local/lib/node_modules/generator-gradle-kotlin/node_modules/cross-spawn-async/index.js:13:18)
at spawn (/usr/local/lib/node_modules/generator-gradle-kotlin/node_modules/cross-spawn/index.js:34:23)
at GradleKotlinGenerator.spawnCommand (/usr/local/lib/node_modules/generator-gradle-kotlin/node_modules/yeoman-generator/lib/actions/spawn_command.js:20:10)
at ChildProcess.<anonymous> (/usr/local/lib/node_modules/generator-gradle-kotlin/generators/app/gradle-kotlin.coffee:78:8)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
I've just fixed it.
It was an OSX-specific bug in the generator logic, a rather stupid one: it incorrectly detected the platform and tried to call ./gradlew.bat, it didn't even realize it's a .bat file, the reason for EACCES error actually was that this .bat didn't have +x permission. Just update the generator to 1.1.1 and it should be fine.
Related
I was trying to install jquery on my Angular project and after write some jquery dependency on package.json doc and type npm update, the console says Error: Module not found: Error: Can't resolve 'angular2-moment'.
Error occurs in the template of component RegisterComponent.
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
× Failed to compile.
✔ Browser application bundle generation complete.
Initial Chunk Files | Names | Raw Size
main.js | main | 83.62 kB |
runtime.js | runtime | 6.51 kB |
4 unchanged chunks
Build at: 2023-01-10T02:39:00.432Z - Hash: 2a1b1b37176d6913 - Time: 536ms
./src/app/app.module.ts:7:0-47 - Error: Module not found: Error: Can't resolve 'angular2-moment' in 'C:\Users\xxxxxx\Desktop\Proyectos IT\registro_cintas\client\src\app'
Error: src/app/app.component.html:6:34 - error NG8002: Can't bind to 'routerLink' since it isn't a known property of 'a'.
6 <a class="link-home" [routerLink]="['/home']">
continue...
~~~~~~~~~~~~~~~~~~~~~~~~
I tryed installing ngx-moment, angular2-moment again or uninstalling this last one algo I erase the entire folder and made a git clone from the last working commit but nothing, I think the angular2-moment it's not compatible with my Angular version but I don't know what to do.
I am trying to white label this github repo.
https://github.com/RocketChat
Here is the white label guide that the RocketChat has provided.
https://developer.rocket.chat/mobile-app/mobile-app-white-labelling/ios-app-white-labelling
This library is for react native. I am facing this issue when I try to run the project.
The project is failing the build process with this error.
> PhaseScriptExecution Upload\ source\ maps\ to\ Bugsnag
> /Users/macbook/Library/Developer/Xcode/DerivedData/RocketChatRN-adkttzebukwzincfwduuaihsdgwi/Build/Intermediates.noindex/RocketChatRN.build/Debug-iphoneos/RocketChatRN.build/Script-88055964DAAE45B1A4886C27.sh
> (in target 'RocketChatRN' from project 'RocketChatRN')
> cd /Users/macbook/Rocket.Chat.ReactNative-develop/ios
> /bin/sh -c /Users/macbook/Library/Developer/Xcode/DerivedData/RocketChatRN-adkttzebukwzincfwduuaihsdgwi/Build/Intermediates.noindex/RocketChatRN.build/Debug-iphoneos/RocketChatRN.build/Script-88055964DAAE45B1A4886C27.sh
>
> ℹ Preparing upload of React Native source map (dev / ios) › Reading
> source map
> "/var/folders/sz/jj5jd6j54kd505vxsyxvlk1h0000gn/T//bcd7e9d7452d009ff844f5acf22fb2f3-main.jsbundle.map"
> › Reading bundle file
> "/Users/macbook/Library/Developer/Xcode/DerivedData/RocketChatRN-adkttzebukwzincfwduuaihsdgwi/Build/Products/Debug-iphoneos/main.jsbundle"
> ℹ Applying transformations to source map › Ensuring sourcesContent
> field is populated › Stripping project root from sources › Initiating
> upload to "https://upload.bugsnag.com/react-native-source-map"
ERROR The request timed out.
Connection timed out
at ClientRequest.<anonymous> (/Users/macbook/Rocket.Chat.ReactNative-develop/node_modules/#bugsnag/source-maps/dist/Request.js:190:21)
at Object.onceWrapper (node:events:641:28)
at ClientRequest.emit (node:events:527:28)
at TLSSocket.emitRequestTimeout (node:_http_client:771:9)
at Object.onceWrapper (node:events:641:28)
at TLSSocket.emit (node:events:539:35)
at TLSSocket.Socket._onTimeout (node:net:516:8)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
I have tried to remove the source map upload. See Screen Shot 1
It keeps on giving the same error still.
It says bugsnag source map failed to upload and is timing out. I have no prior experience with React Native and I am just trying to white label their code. So any help will be appreciated.
Would you be able to check your package.json file for which version of #bugsnag/source-maps you are using? If you are using anything prior to v2.3.0 of #bugsnag/source-maps you could try updating as it has now increased the default timeout and made some other improvements.
Try this, (M1 Mac only I guess)
Go to the target you want to archive
Build settings ---> Architectures ---> Excluded Architectures
Delete arm64
Also another possible reason could be that Xcode is using an outdated version of Node
By default, Xcode will use the Node binary located at /usr/local/bin/node. Check its version by running:
/usr/local/bin/node -v
node -v
If the first command outputs an older version of Node, simply delete it and replace it with a symlink to the newer one:
rm -rf /usr/local/bin/node
ln -s $(which node) /usr/local/bin/node
Keep getting this error when trying to build templates
[09:21:08] Requiring external module babel-register
[09:21:19] Using gulpfile ~/GIT/Newsletters/gulpfile.babel.js
[09:21:19] Starting 'build'...
[09:21:19] Starting 'clean'...
[09:21:19] Finished 'clean' after 5.98 ms
[09:21:19] Starting 'pages'...
[09:21:20] Finished 'pages' after 1.96 s
[09:21:20] Starting 'sass'...
Error in plugin "gulp-sass"
Message:
gulp-sass no longer has a default Sass compiler; please set one yourself.
Both the "sass" and "node-sass" packages are permitted.
For example, in your gulpfile:
const sass = require('gulp-sass')(require('sass'));
When I then add const sass = require('gulp-sass')(require('sass')); in my gulpfile.js
It gives this error
[09:41:01] Requiring external module babel-register
{ TypeError: /Users/lde4k1v/GIT/Newsletters/gulpfile.babel.js: Duplicate declaration "sass"
76 |
77 | // Compile Sass into CSS
> 78 | function sass() {
| ^
79 | return gulp.src('src/assets/scss/app.scss')
80 | .pipe($.if(!PRODUCTION, $.sourcemaps.init()))
81 | .pipe($.sass({
Here is my full gulpfile.babel.js
Can someone help me out :( already searched quite some time on it and can't find seem to fix it sadly
I would like to install elm-export package using stack. It needs to be imported in a servant-elm example.
It's like:
shell> stack install elm-export
shell>
No error message. So I thought it's installed.
But when I stack build,
Error message shows:
test-0.1.0.0: build (exe)
Preprocessing executable 'test' for test-0.1.0.0..
Building executable 'test' for test-0.1.0.0..
[1 of 1] Compiling Main ( src\Main.hs, .stack-
work\dist\5c8418a7\build\test\test-tmp\Main.o )
C:\Code\Haskell\11_Stack-Projects-That-Need-Dependency\test\src\Main.hs:6:1:
error:
Could not find module ▒▒Elm▒▒
Use -v to see a list of the files searched for.
|
6 | import Elm (Spec (Spec), specsToDir, toElmDecoderSource,
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
My question is, Where can I check if the package is installed? And how do I fix this?
ps. Cabal successfully installed elm-export and servant-export and runghc successfully run example code. Now I am trying to use stack to install package to prevent from ruining some dependency.
If you want to use this library in a haskell stack package you don't need to run stack install. Instead you need to add it to your project dependencies.
See the HaskellStack User Guide (adding dependencies)
Depending on the version of stack you have this might be in one of two places I think:
if you have a packages.yaml, add it in the section 'dependencies'
dependencies:
- base >= 4.7 && < 5
- elm-export >= 0.6 && < 1.0
if you don't have packages.yaml, add it to you cabal file directly
library
hs-source-dirs:
src
build-depends:
base >=4.7 && <5
, elm-export >= 0.6 && < 1.0
FYI: stack install is used to install executables which you can then use on the command line. It can be used inside or outside of haskell stack projects.
I don't think elm-export declares any executables, which is why it didn't output anything. Some examples are pandoc, hindent, etc. These are haskell libraries which also provides executables that you can install using stack.
$ stack install pandoc
...
Copied executables to /Users/<me>/.local/bin:
- pandoc
$ pandoc --help
pandoc [OPTIONS] [FILES]
-f FORMAT, -r FORMAT --from=FORMAT, --read=FORMAT
I just installed the Bazel plugin for IntelliJ, and I keep getting this exception:
com.google.idea.blaze.base.command.info.BlazeInfoException: blaze info failed with exit code: -1
java.util.concurrent.ExecutionException:
com.google.idea.blaze.base.command.info.BlazeInfoException: blaze info failed with exit code: -1
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:502)
[...]
at com.google.idea.blaze.base.async.FutureUtil$Builder.lambda$run$0(FutureUtil.java:93)
[...]
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:170)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:548)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:493)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
at com.google.idea.blaze.base.async.executor.BlazeExecutor$3.call(BlazeExecutor.java:108)
at com.google.idea.blaze.base.async.executor.BlazeExecutor$3.call(BlazeExecutor.java:105)
[...]
Caused by: com.google.idea.blaze.base.command.info.BlazeInfoException: blaze info failed with exit code: -1
at com.google.idea.blaze.base.command.info.BlazeInfoRunnerImpl.runBlazeInfo(BlazeInfoRunnerImpl.java:105)
at com.google.idea.blaze.base.command.info.BlazeInfoRunnerImpl.lambda$runBlazeInfo$2(BlazeInfoRunnerImpl.java:75)
... 6 more
Edit: I am using IntelliJ 2017.3 on MacOS El Capitan 10.11.6, Java JRE 1.8.0, and the Bazel version is 0.8.1-homebrew (the plugin version is 2017.11.20.0.4). I get this error when I try to setup a new Java project (an Hello World with only one class and one BUILD file containing a java_binary similar to this tutorial), and it appears when I click on the Bazel sync button.
The output in the Bazel console is:
Syncing project: Sync (incremental)...
Updating VCS...
Running Bazel info...
Command: info --tool_tag=ijwb:IDEA:community --curses=no --color=no --experimental_ui=no --progress_in_terminal_title=no --
==== TIMING REPORT ====
Sync: 47ms
BazelInfo: 4ms
Timing summary:
BlazeInvocation: 4ms
Sync failed
Command: git diff --name-status --no-renames abc8913346474d12ad45226503438848011929ae
Does anybody have an idea about what is it and/or how to fix it? Thanks!
I found my answer, thanks to this post.
In IntelliJ > Settings > Other Settings > Bazel Settings, the field "Bazel binary location" was empty. For my case, I entered /usr/local/bin/bazel and now it works!