Create Krakenjs app with yeoman - node.js

I want to create a Krakenjs app whit the next command: yo kraken , but thw console give me the next error:
Stack trace:
Error: EACCES, open '/home/erik/.cache/bower/packages/64c3d861bd88c012885cd73d2f0e6a53-2.1.14.lock'
Console trace: Trace
at StandardRenderer.error (/usr/lib/node_modules/bower/lib/renderers/StandardRenderer.js:72:17)
at Logger.<anonymous> (/usr/lib/node_modules/bower/bin/bower:110:22)
at Logger.emit (events.js:95:17)
at Logger.emit (/usr/lib/node_modules/bower/node_modules/bower-logger/lib/Logger.js:29:39)
at /usr/lib/node_modules/bower/lib/commands/index.js:40:20
at _rejected (/usr/lib/node_modules/bower/node_modules/q/q.js:797:24)
at /usr/lib/node_modules/bower/node_modules/q/q.js:823:30
at Promise.when (/usr/lib/node_modules/bower/node_modules/q/q.js:1035:31)
at Promise.promise.promiseDispatch (/usr/lib/node_modules/bower/node_modules/q/q.js:741:41)
at /usr/lib/node_modules/bower/node_modules/q/q.js:557:44
System info:
Bower version: 1.3.9
Node version: 0.10.30
OS: Linux 3.13.0-32-generic x64

You've probably got items in ~/.cache/ owned by root. This happens when you run bower with sudo. You shouldn't need to do that.
Fix the permissions -- probably sudo chown -R youruser ~/.cache/

Related

E/launcher - Process exited with error code 135

I am trying to run the protractor test from my windows machine.
Configuration Used:
OS : Windows 7
Node : 6.11.3
Protractor : 5.1.2
NPM : 3.10.10
I am unable to run the Protractor test because of the below error.
C:\Users\Admin>protractor conf.js [14:45:16] I/launcher - Running 1 instances of WebDriver [14:45:16] I/hosted - Using the selenium server at http://localhost:4444/wd/hub [14:45:18] E/launcher - Error code: 135 [14:45:18] E/launcher - Error message: ECONNREFUSED connect ECONNREFUSED 127.0.0 .1:4444 [14:45:18] E/launcher - Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
at ClientRequest.<anonymous> (C:\Users\Admin\AppData\Roaming\npm\node_module s\protractor\node_modules\selenium-webdriver\http\index.js:238:15)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at Socket.socketErrorListener (_http_client.js:310:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at emitErrorNT (net.js:1277:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9) From: Task: WebDriver.createSession()
at Function.createSession (C:\Users\Admin\AppData\Roaming\npm\node_modules\p rotractor\node_modules\selenium-webdriver\lib\webdriver.js:777:24)
at Function.createSession (C:\Users\Admin\AppData\Roaming\npm\node_modules\p rotractor\node_modules\selenium-webdriver\chrome.js:709:29)
at createDriver (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\ node_modules\selenium-webdriver\index.js:167:33)
at Builder.build (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor \node_modules\selenium-webdriver\index.js:623:16)
at Hosted.getNewDriver (C:\Users\Admin\AppData\Roaming\npm\node_modules\prot ractor\lib\driverProviders\driverProvider.ts:60:29)
at Runner.createBrowser (C:\Users\Admin\AppData\Roaming\npm\node_modules\pro tractor\lib\runner.ts:225:39)
at q.then.then (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\l ib\runner.ts:391:27)
at _fulfilled (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\no de_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Users\Admin\AppData\Roaming\npm\node_module s\protractor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Users\Admin\AppData\Roaming\npm\node_ modules\protractor\node_modules\q\q.js:796:13) [14:45:18]
***E/launcher - Process exited with error code 135***
I keep receiving the error "E/launcher - Process exited with error code 135" noted in the stack-trace above. How can I get the protractor test to complete successfully?
Try doing below steps:-
Open cmd and in the home path use below commands.
webdriver-manager clean
webdriver-manager status
webdriver-manager update
webdriver-manager start.
It looks like You can't connect to the selenium server. Comment this :
seleniumAddress: 'http://localhost:4444/wd/hub'
and replace it with:
directConnect: true,
just to check if is working directly.
Also You can navigate directly to http://localhost:4444/wd/hub to see If you can access there. If not it might be some firewall or something similar.
First, open a command prompt and then
run the following command:
webdriver-manager start
Open a second command prompt then enter your command. Mine is protractor conf.js
Probably a bit late but I get this error when I fail to start server for web-driver using:
webdriver-manager start
Update the chrome driver using the command =>
webdriver-manager update --versions.chrome <73.0.3683.68>
after upgrading just install node modules once again using cmd => npm install

watchman.plist permission denied when running a react-native initial project

I'm start using react-native and I followed the tutorials on the website, but when running the example project, it returned some error messages on the terminal:
Looking for JS files in
/Users/username/Desktop/nativeTest/BookSearch
[06:03:00] <START> Building Dependency Graph
[06:03:00] <START> Crawling File System
[06:03:00] <START> Loading bundles layout
[06:03:00] <END> Loading bundles layout (0ms)
React packager ready.
2015-12-13T06:03:01,281: [cli] Failed to open /Users/username/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
2015-12-13T06:03:01,281: [cli] Failed to open /Users/username/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
Watchman: watchman--no-pretty get-sockname returned with exit code null 2015-12-13T06:03:01,281: [cli] Failed to open /Users/username/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
ERROR watchman--no-pretty get-sockname returned with exit code null 2015-12-13T06:03:01,281: [cli] Failed to open /Users/username/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
Error: watchman--no-pretty get-sockname returned with exit code null 2015-12-13T06:03:01,281: [cli] Failed to open /Users/username/Library/LaunchAgents/com.github.facebook.watchman.plist for write: Permission denied
at ChildProcess.<anonymous> (/Users/username/Desktop/nativeTest/BookSearch/node_modules/fb-watchman/index.js:194:18)
at emitTwo (events.js:88:13)
at ChildProcess.emit (events.js:173:7)
at maybeClose (internal/child_process.js:819:16)
at Socket.<anonymous> (internal/child_process.js:320:11)
at emitOne (events.js:78:13)
at Socket.emit (events.js:170:7)
at Pipe._onclose (net.js:470:12)
See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.
~
Process terminated. Press <enter> to close the window
I tried to chmod com.github.facebook.watchman.plist but actually there's no such file there. Maybe I should change the path of the file?
Other things I've tried:
brew update
brew upgrade watchman
brew uninstall watchman && brew install --HEAD watchman
Restart and reinit the project
Packages Version (if needed):
node: v5.2.0
watchman: v4.2.0
Current user do not have permission on folder /Users/[username]/Library/LaunchAgents.
Use the following command to fix this:
$ sudo chown $(whoami) /Users/$(whoami)/Library/LaunchAgents
Make sure that /Users/username/Library and /Users/username/Library/LaunchAgents are owned by username and have the correct permissions; here's how mine look:
$ ls -ld ~/Library
drwx------+ 57 wez users 1938 Nov 6 07:49 /Users/wez/Library
$ ls -ld ~/Library/LaunchAgents
drwxr-xr-x 3 wez users 102 Dec 11 16:13 /Users/wez/Library/LaunchAgents
$ ls -l ~/Library/LaunchAgents/com.github.facebook.watchman.plist
-rw-r--r-- 1 wez users 1545 Dec 11 16:13 /Users/wez/Library/LaunchAgents/com.github.facebook.watchman.plist
Also make sure that you don't run watchman as root or via sudo.

React-native connection errors

I'm trying to start a new project in React Native but I'm getting errors when I try to launch iOS Simulator. I have not edited the index.ios.js. I'm using iOS Simulator to run the project, and the error in the emulator is 'Could not connect to development server...'
Looking for JS files in /Users/jeff/Documents/TestApp
ERROR EACCES, permission denied '/Users/jeff/.babel.json'
{"errno":-13,"code":"EACCES","path":"/Users/jeff/.babel.json","syscall":"open"}
Error: EACCES, permission denied '/Users/jeff/.babel.json'
at Error (native)
at Object.fs.openSync (evalmachine.:500:18)
at Object.fs.writeFileSync (evalmachine.:1099:15)
at save (/Users/jeff/Documents/TestApp/node_modules/react-native/node_modules/babel-core/lib/api/register/cache.js:35:19)
at process._tickCallback (node.js:355:11)
at Function.Module.runMain (module.js:503:11)
at startup (node.js:129:16)
at node.js:814:3
See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions. evalmachine.:565
fs.write = function(fd, buffer, offset, length, position, callback) {
^ Error: EACCES, permission denied '/Users/jeff/.babel.json'
at Error (native)
at Object.fs.openSync (evalmachine.:500:18)
at Object.fs.writeFileSync (evalmachine.:1099:15)
at process.save (/Users/jeff/Documents/TestApp/node_modules/react-native/node_modules/babel-core/lib/api/register/cache.js:35:19)
at process.emit (events.js:107:17)
at process.exit (node.js:600:17)
at process. (/Users/jeff/Documents/TestApp/node_modules/react-native/packager/packager.js:143:11)
at process.emit (events.js:107:17)
at process._fatalException (node.js:236:26) Process terminated. Press to close the window
I had fixed this problem, and execute the following command
sudo chmod 777 ~/.babel.json
and then re-init the react-native project, it will be successful.
You can try just
nvm alias default iojs-v2
If that doesn't work try going through all the steps in the installation guide again. Then in your project folder
rm -rf node_modules/
npm i
In Xcode remove RCTWebSocketDebugger from your libraries:
YourProject > Libraries > RCTWebSocketDebugger
Then in Xcode Product -> Clean and try building again
Giving the admin permissions to the path ~/.babel.json should help. Try with this command:
sudo chmod 777 ~/.babel.json

Can't start bundled Meteor app: "Error: failed to connect to [127.0.0.1:3001]"

I'm trying to bundle and run Meteor (v1.0) as a raw Node project.
Here are the steps I've taken:
$ cd app_dir
$ meteor build build_dir.
$ cd build_dir/programs/server
$ npm install
$ cd build_dir
$ PORT=3000 MONGO_URL=mongodb://127.0.0.1:3001/meteor node main.js
At this point I get an error:
Exception in callback of async function: Error: failed to connect to [127.0.0.1:3001]
at null.<anonymous> (/Users/byrnef87/Sites/lookback-site/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/connection/server.js:536:74)
at emit (events.js:106:17)
at null.<anonymous> (/Users/byrnef87/Sites/lookback-site/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:150:15)
at emit (events.js:98:17)
at Socket.<anonymous> (/Users/byrnef87/Sites/lookback-site/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/connection/connection.js:516:10)
at Socket.emit (events.js:95:17)
at net.js:440:14
at process._tickCallback (node.js:419:13)
Any ideas on what could be causing this or how to debug it?
Thanks!
The solution that ended up fixing it for me was just re-cloning the repo, upgrading node to the latest version, upgrading MongoDB to the latest version and running it with a ROOT_URL like so:
ROOT_URL=http://localhost:3000 PORT=3000 MONGO_URL=mongodb://127.0.0.1:27017/meteor node main.js
Once you've started mongodb you need to provide the port it is running on in the MONGO_URL:
PORT=3000 MONGO_URL=mongodb://127.0.0.1:27017/meteor node main.js

error when starting the server with grunt or node server

I am trying to use the mean stack as described here : http://mean.io/
after install, when making "grunt", there is an error :
debugger listening on port 5858
4 Jan 01:47:40 - [nodemon] reading ignore list
Express app started on port 3000
events.js:72
throw er; // Unhandled 'error' event
^
Error: failed to connect to [localhost:27017]
at null.<anonymous> (/mean/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:540:74)
at EventEmitter.emit (events.js:106:17)
at null.<anonymous> (/mean/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:140:15)
at EventEmitter.emit (events.js:98:17)
at Socket.<anonymous> (/mean/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection.js:478:10)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:441:14
at process._tickCallback (node.js:415:13)
4 Jan 01:47:40 - [nodemon] app crashed - waiting for file changes before starting...
I tried the troubleshooting as specified on the site : Updating Grunt, bower and cleaning npm and bower caches worked well. but updating npm gives an error too:
npm ERR! error rolling back Error: Refusing to delete: /usr/local/bin/npm not in /usr/local/lib/node_modules/npm
This looks like a conflict between homebrew and npm.
but anyway i have version 1.3.21 installed.
There is the same error when i am trying node server.
do you have an idea on what i can do to make the server work ?
It may be too easy, but seems like your MongoDB server is not actually running. After having installed Mongo (on your Mac, I assume?), you have to open a Terminal window/tab, run mongod and leave it running (or use screen, etc.). You can try to access MongoDB CLI by typing mongo to make sure the server is running.
#desgnl: if you don't want to run mongod command everytime you are running the grunt, you can always use third party services like MongoDB Hosting: Database-as-a-Service by MongoLab https://mongolab.com Hope this helps too!

Resources