Error when running yeoman init - command

I'm getting the following error when I run `yeoman init angularĂ¹, although the angular part shouldn't matter, since I got the same error:
create test/lib/angular-mocks.js
<WARN> Unable to create directory "/Users/myuserfolder/test/lib" (Error code: ENOTDIR). Use --force to continue. </WARN>
it seems to be trying to create a file in my home folder, which is weird, becuse I cd'd into a folder designated for my project. What could be going on here?

That is a known bug caused by you having a Gruntfile in your home directory.

Related

trying to connect postgresql to go but I'm getting an error

I've imported a module called "github.com/lib/pq". before I ran my code, I inserted this in the terminal % go get github.com/lib/pq. Then when i tried to run my code, I'm getting an error message in the terminal
'no required module provides package github.com/lib/pq: go.mod file not found in current directory or any parent directory; see 'go help modules'
Running go mod tidy will sync your go.mod and go.sum file with the imports in your code, this will add missing dependencies and remove unnecessary ones. Should solve your issue.

I'm trying to run this command "bitbake-layers show-recipes"

I'm trying to setup Yocto project in my linux system. I have added two layers which point outside the Yocto poky folder.
I'm following build steps from here:
https://www.yoctoproject.org/docs/2.7/brief-yoctoprojectqs/brief-yoctoprojectqs.html
I am trying to run the following command "bitbake-layers show-recipes 'ara-'*"
I'm getting this error
ERROR: ExpansionError during parsing /home/XXX/YYYYY/codebase/apd-source/meta-openembedded/meta-oe/recipes-support/syslog-ng/syslog-ng_3.6.4.bb
But I'm expecting output something like this:
***Parsing recipes..done.
=== Matching recipes: ===
ara-com-examples:
meta-ara 1.0.0
ara-com-fusion-example:
meta-ara 1.0.0
ara-com-gen:***
.
.
.
.
.
This error indicates bitabake failed to parse the recipe and could be due to syntax error from the recipe. But I have encounter this issue even without any error in my recipes. Honestly the don't know why that happened and that could be some issue with the build environment. Not sure.
In this situation, can you try
1. Remove the build directory and also ssttate cache directory.
2. Execute the setup environment script and rebuild
Try with the above steps and check issue resolved. And before that make sure you don't have any syntax error in the syslog_ng recipe , check do you have any bbappend recieps for syslog_ng in your layer or any other layers and they don't have any syntax errors.

why does ./regenerate-makefiles.sh gives error to compile irstlm

I've got a problem compiling irstlm. I've extracted it following the steps from moses and tried another way, but I always get this error:
bash: ./regenerate-makefiles.sh: No such file or directory
If you are using a version of IRSTLM later than 5.80.03, make sure you are in the "trunk" folder first.

how to include a local javascript im ember-cli application

I have a local javascript in my application that i want to include in my ember-cli application.
it is called carrotsearch.foamtree.js
In order that it will be included i put it under vendor\foamtree\carrotsearch.foamtree
and in the app.js i write
import CarrotSearchFoamTree from 'foamtree/carrotsearch.foamtree'
the problem is that i get an error
===== 1 JSHint Error
Build failed. ENOENT, no such file or directory
'C:\Users\davidga\Desktop\ember\nextgen\tmp\tree_merger-tmp_dest_dir-37cYqLzL.tmp\foamtree\carrotsearch.foamtree.js'
File: foamtree/carrotsearch.foamtree.js Error: ENOENT, no such file or directory C:\Users\davidga\Desktop\ember\nextgen\tmp\tree_merger-tmp_dest_dir-37cYqLzL.tmp\foamtree\carrotsearch.foamtree.js'
at Object.fs.statSync (fs.js:689:18) at addModule
(C:\Users\davidga\Desktop\ember\nextgen\node_modules\ember-cli\no
de_modules\broccoli-es6-concatenator\index.js:83:46) at addModule
(C:\Users\davidga\Desktop\ember\nextgen\node_modules\ember-cli\no
de_modules\broccoli-es6-concatenator\index.js:126:9) at
C:\Users\davidga\Desktop\ember\nextgen\node_modules\ember-cli\node_modules\
broccoli-es6-concatenator\index.js:59:7 at tryCatch
(C:\Users\davidga\Desktop\ember\nextgen\node_modules\ember-cli\nod
e_modules\rsvp\dist\commonjs\rsvp-internal.js:163:16) at
invokeCallback
(C:\Users\davidga\Desktop\ember\nextgen\node_modules\ember-c
li\node_modules\rsvp\dist\commonjs\rsvp-internal.js:172:17) at
publish
(C:\Users\davidga\Desktop\ember\nextgen\node_modules\ember-cli\node
_modules\rsvp\dist\commonjs\rsvp-internal.js:150:13) at flush (C:\Users\davidga\Desktop\ember\nextgen\node_modules\ember-cli\node_m
odules\rsvp\dist\commonjs\rsvp\asap.js:51:9) at
process._tickCallback (node.js:419:13)
I thought that the problem is maybe bower related so i followed the following post how to include a private local file in javascript project using bower
The problem is that neither
"foamtree": "foamtree/carrotsearch.foamtree.js"
nor
"foamtree": "vendor/foamtree/carrotsearch.foamtree.js"
works.
What may i do?
Thanks,
David
I found an answer.
In brocfile.js we can add the line
app.import('vendor/foamtree/carrotsearch.foamtree.js')
I don't know if this is an optimal anser but it works
Update:
This solution is stated in the ember-cli documentation
http://iamstef.net/ember-cli/#managing-dependencies
If you don't need them to minified in your vendor.js file you can put them in the public/js and then include it as a normal script file in app/index.html. I use this method for some libraries like moment.js.
The public folder gets directly copied to your site root during the build.

java.io.IOException when running sbt from ensime?

I have tried ensime/sbt on mac os. First, I open the .scala file in project folder create from using sbt in command-line, then I ran ensime and it still work fine, but whenever I run ensime-sbt (c-c c-v s), I got
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:883)
at xsbt.boot.Locks$.apply0(Locks.scala:34)
at xsbt.boot.Locks$.apply(Locks.scala:27)
at scala.collection.Iterable$class.$init$(Proxy.scala:32)
at xsbt.boot.Launch$ScalaProvider.<init>(Launch.scala:107)
at xsbt.boot.Launch$$anonfun$1.apply(Launch.scala:83)
at org.apache.ivy.plugins.namespace.NamespaceRule.newEntry(Cache.scala:17)
at org.apache.ivy.plugins.namespace.NamespaceRule.apply(Cache.scala:12)
at xsbt.boot.Launch.getScala(Launch.scala:85)
at xsbt.boot.Launch$.run(Launch.scala:49)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:43)
at xsbt.boot.Launch$.launch(Launch.scala:68)
at xsbt.boot.Launch$.apply(Launch.scala:14)
at xsbt.boot.Boot$.runImpl(Boot.scala:24)
at xsbt.boot.Boot$.main(Boot.scala:15)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.io.IOException: No such file or directory
Process sbt exited abnormally with code 1
I tried using sbt from command-line and everything works from there (compile/run/console). I'm using sbt 0.10.1 and latest binary ensime on emacs24 (2011/07/24) on mac os.
Any idea that I'm doing it wrong ?
I had this and after applying strace I found the issue. The ensime-sbt.el function searches up from the cwd looking for ./project/build.properties. On finding this dir/file it assumes this is the root directory.
So just create this file and this issue should disappear. Would be nice if ensime created this file by default seeing as it's a required file for the sbt function to work.
I got the same error. This situation seems to be that sbt tried but failed to create ".sbt" and ".ivy" dir at the user's home directory. Maybe, the reason is that OS user doesn't have permission to write at the user's home directory.
It's something related with permission, maybe.
I checked the Locks.scala https://github.com/harrah/xsbt/blob/0.10/launch/Locks.scala source, and guessed "file.getParentFile.mkdirs()" did no work because of permission denial.
I encountered the same problem yesterday, and got it run a minute ago, by adding sudo:
"sudo emacs xxx.scala"
you can change sbt.ivy.home and ivy.home property. So, to augment Joachim's first solution, you would set both system properties:
like this:
java -Dsbt.ivy.home=/tmp/.ivy2/ -Divy.home=/tmp/.ivy2/ -jar dirname $0/sbt-launch.jar "$#"
hope to resolve you problem
This error also occurs when the files in the home directory that sbt tries to access are not owned by the user that tries to run it. run a chmod 777 on the directoris in the home master and the issue will be solved.