How to make the kline node js command work? - sockets

I try to execute the node kline command, but it gives me an error:
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module 'C:\Program Files\nodejs\kline'
←[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:725:27)←[39m
←[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)←[39m
←[90m at internal/main/run_main_module.js:17:47←[39m {
code: ←[32m'MODULE_NOT_FOUND'←[39m,
requireStack: []
}
Although npm install kline was successful. Tell me, maybe I missed something.

From what I gathered the kline module doesn't seem to be designed for the command line. Besides this to install a package which should run from the command line, e.g. nodemon, you should add the -g flag to the npm install command. This will install your package in the global npm scope which also supports calling these packages as a command, if supported.

Related

Running SASS on Gatsby not working

Yesterday, I was able to setup a starter-pack instance of gatsby and deploy to github pages.
Since then, I've updated my react/js files locally, which seemed to run fine locally. Now I want to compile my sass:
I can't find a decent solution which works:
Here's the sass compiler I tried to install:
sass --watch assets/scss/main.scss:assets/css/style.css
Node sass watch runs, but doesn't actually compile anything. I get an error instead:
Problems:
1) Since installing the sass
./src/assets/scss/main.scss
Module parse failed: /Users/reenaverma/development/GATSBY/src/assets/scss/main.scss Unexpected character '#' (1:8)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected character '#' (1:8)
at Parser.pp$4.raise (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:2221:15)
at Parser.pp$7.getTokenFromCode (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:2756:10)
at Parser.pp$7.readToken (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:2477:17)
at Parser.pp$7.nextToken (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:2468:15)
at Parser.pp$7.next (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:2413:10)
at Parser.pp.eat (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:536:12)
at Parser.pp$1.parseStatement (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:728:71)
at Parser.pp$1.parseTopLevel (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:638:25)
at Parser.parse (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:516:17)
at Object.parse (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:3098:39)
at Parser.parse (/Users/reenaverma/development/GATSBY/node_modules/webpack/lib/Parser.js:902:15)
at NormalModule.<anonymous> (/Users/reenaverma/development/GATSBY/node_modules/webpack/lib/NormalModule.js:104:16)
at NormalModule.onModuleBuild (/Users/reenaverma/development/GATSBY/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:310:10)
at nextLoader (/Users/reenaverma/development/GATSBY/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:275:25)
at /Users/reenaverma/development/GATSBY/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
at Storage.finished (/Users/reenaverma/development/GATSBY/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:16)
at /Users/reenaverma/development/GATSBY/node_modules/graceful-fs/graceful-fs.js:78:16
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:528:3)
# ./src/layouts/index.js 29:0-35
2) I've even tried this link, but this doesn't work either:
https://www.npmjs.com/package/gatsby-plugin-sass
3) For some reason, I also can't deploy to Github/git push origin master / npm run deploy
error: ./src/assets/scss/main.scss
Module parse failed: /Users/reenaverma/development/GATSBY/src/assets/scss/main.scss Unexpected character '#' (1:8)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected character '#' (1:8)
at Parser.pp$4.raise (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:2221:15)
at Parser.pp$7.getTokenFromCode (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:2756:10)
at Parser.pp$7.readToken (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:2477:17)
at Parser.pp$7.nextToken (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:2468:15)
at Parser.pp$7.next (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:2413:10)
at Parser.pp.eat (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:536:12)
at Parser.pp$1.parseStatement (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:728:71)
at Parser.pp$1.parseTopLevel (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:638:25)
at Parser.parse (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:516:17)
at Object.parse (/Users/reenaverma/development/GATSBY/node_modules/acorn/dist/acorn.js:3098:39)
at Parser.parse (/Users/reenaverma/development/GATSBY/node_modules/webpack/lib/Parser.js:902:15)
at NormalModule.<anonymous> (/Users/reenaverma/development/GATSBY/node_modules/webpack/lib/NormalModule.js:104:16)
at NormalModule.onModuleBuild (/Users/reenaverma/development/GATSBY/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:310:10)
at nextLoader (/Users/reenaverma/development/GATSBY/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:275:25)
at /Users/reenaverma/development/GATSBY/node_modules/webpack/node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
at Storage.finished (/Users/reenaverma/development/GATSBY/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:16)
# ./src/layouts/index.js 28:0-35
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gatsby-starter-default#1.0.0 deploy: `gatsby build --prefix-paths && gh-pages -b master -d public`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gatsby-starter-default#1.0.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/reenaverma/.npm/_logs/2018-05-30T13_34_31_289Z-debug.log
PLEASE HELP! I need this sorted by tonight:
Here's my code from yesterday.... But I have updated 3 js files. But this works locally. Seems trying to run sass is breaking my work:
https://github.com/ReenaVerma/reenaverma.github.io/tree/master
The following 2 steps has helped me:
1) run npm install gatsby-plugin-sass to download sass plugin for Gatsby;
2) add gatsby-plugin-sass to plugins section of the gatsby-config.json file.

Command failed with exit code 2 in ionic

I HAVE THIS ERROR
On build app in ionic
sudo ionic build android
Error: ANDROID_HOME is not set and "android" command not in your PATH.
You must fulfill at least one of these conditions.
at /home/sbh/testt/mobilebra/platforms/android/cordova/lib/check_reqs.js:206:19
at _fulfilled (/home/sbh/testt/mobilebra/platforms/android/cordova/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/home/sbh/testt/mobilebra/platforms/android/cordova/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/home/sbh/testt/mobilebra/platforms/android/cordova/node_modules/q/q.js:760:13)
at /home/sbh/testt/mobilebra/platforms/android/cordova/node_modules/q/q.js:821:14
at flush (/home/sbh/testt/mobilebra/platforms/android/cordova/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:607:11)
at run (bootstrap_node.js:422:7)
Error: /home/sbh/testt/mobilebra/platforms/android/cordova/build:
Command failed with exit code 2
Do the following:
(nano is my preference, use whatever your heart desires)
sudo nano ~/.bashrc
add the following lines, modifying the paths if your SDKs in a different spot:
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Sailsjs - sails lift command is not working on windows

I'm new to sailsjs. I created a new simple application with sailsjs and after run sails lift I got following error. Could you please anyone have an idea about this issue and tell how fix this.
Thanks.
info: Starting app...
C:\Users\kavi\AppData\Roaming\npm\node_modules\sails\errors\warn.js:48
'The local Sails dependency installed at `' + pathTo.localSails + '` ' +
^
ReferenceError: pathTo is not defined
at Object.module.exports.badLocalDependency (C:\Users\kavi\AppData\Roaming\n
pm\node_modules\sails\errors\warn.js:48:53)
at Sails.isLocalSailsValid (C:\Users\kavi\AppData\Roaming\npm\node_modules\s
ails\lib\app\private\isLocalSailsValid.js:51:14)
at Function.bound [as isLocalSailsValid] (C:\Users\kavi\AppData\Roaming\npm\
node_modules\sails\node_modules\lodash\dist\lodash.js:729:21)
at Command.module.exports (C:\Users\kavi\AppData\Roaming\npm\node_modules\sa
ils\bin\sails-lift.js:48:13)
at Command.<anonymous> (C:\Users\kavi\AppData\Roaming\npm\node_modules\sails
\node_modules\commander\index.js:249:8)
at Command.EventEmitter.emit (events.js:98:17)
at Command.parseArgs (C:\Users\kavi\AppData\Roaming\npm\node_modules\sails\n
ode_modules\commander\index.js:477:12)
at Command.parse (C:\Users\kavi\AppData\Roaming\npm\node_modules\sails\node_
modules\commander\index.js:370:21)
at Object.<anonymous> (C:\Users\kavi\AppData\Roaming\npm\node_modules\sails\
bin\sails.js:144:9)
at Module._compile (module.js:456:26)
Run npm install in your project root folder and after sails lift.
follow these steps,
1: npm install sails -g
2: npm install
note-run these commands as administrator

Sailsjs grunt .svn error during lifting

I have imported my project in svn when I did a checkout and ran the app I got this error I am using sailsjs-0.10.5. I think it is to do with the grunt I am not able to find any solution it works fine in mac not in linux I set the permissin to 0777 even though it is not working here is the error.
verbose: Grunt :: Loading "Gruntfile.js" tasks...
verbose: Grunt :: ERROR
verbose: Grunt :: >> TypeError: Property '.svn' of object # is not a function
verbose: Grunt :: Warning: Task "default" not found.
error: ** Grunt :: An error occurred. **
error:
Aborted due to warnings.
Loading "Gruntfile.js" tasks...ERROR
TypeError: Property '.svn' of object # is not a function
Warning: Task "default" not found.
error: Looks like a Grunt error occurred--
error: Please fix it, then restart Sails to continue running tasks (e.g. watching for changes in assets)
error: Or if you're stuck, check out the troubleshooting tips below.
error: Troubleshooting tips:
error:
error: *-> Are "grunt" and related grunt task modules installed locally? Run npm install if you're not sure.
error:
error: *-> You might have a malformed LESS, SASS, CoffeeScript file, etc.
error:
error: *-> Or maybe you don't have permissions to access the .tmp directory?
error: e.g., /var/hosts/chating_room/.tmp ?
error:
error: If you think this might be the case, try running:
error: sudo chown -R YOUR_COMPUTER_USER_NAME /var/hosts/chating_room/.tmp
Make changes to Gruntfile.js, find loadTasks function, add excludeDirs : /^\.(git|svn)$/:
Original:
function loadTasks(relPath) {
return includeAll({
dirname: require('path').resolve(__dirname, relPath),
filter: /(.+)\.js$/
}) || {};
}
After:
function loadTasks(relPath) {
return includeAll({
dirname: require('path').resolve(__dirname, relPath),
filter: /(.+)\.js$/,
excludeDirs : /^\.(git|svn)$/
}) || {};
}
I have a same problem.
FIXED by
Simply deleting .svn folder from
1) task/.svn,
2) config/.svn &
3) register/.svn

Cakefile not requiring *.coffee files

I have the following files:
Cakefile:
require './test'
test.coffee:
console.log 'hi'
another_test.coffee:
require './test'
If I run cake, I get the following exception:
module.js:340
throw err;
^
Error: Cannot find module './test'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/jose/Desktop/Cakefile:2:3)
at Object.<anonymous> (/Users/jose/Desktop/Cakefile:4:4)
at Module._compile (module.js:456:26)
However, if I run coffee another_test.coffee, I get this output:
hi
I installed node using brew and coffee-script using npm, and am using the following versions:
$ node -v
v0.10.24
$ npm -v
1.3.21
$ coffee -v
CoffeeScript version 1.7.1
Why can't Cakefile require test.coffee?
Solved by adding:
require 'coffee-script/register'
on top of Cakefile. See: https://stackoverflow.com/a/21678007/347915
Have you tried using an absolute path ? Try this instead :
require "#{__dirname}/test"