JSMP init command getting einval error - npm

jspm init results in:
Package.json file does not exist, create it? [yes]:
err Error: EINVAL, invalid argument
at new Socket (net.js:157:18)
at process.stdin (node.js:687:19)
at MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\lib\ui.js:202:12
at lib$rsvp$$internal$$initializePromise (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\node_modules\rsvp\dist\rsvp.js:1084:9)
at new lib$rsvp$promise$$Promise (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\node_modules\rsvp\dist\rsvp.js:546:53)
at Object.exports.input (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\lib\ui.js:190:10)
at Object.exports.confirm (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\lib\ui.js:157:15)
at Promise.resolve.then.then.config.pjsonPath (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\lib\config.js:70:17)
at tryCatchReject (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\node_modules\systemjs\node_modules\when\es6-shim\Promise.js:1183:30)
at runContinuation1 (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\node_modules\systemjs\node_modules\when\es6-shim\Promise.js:1142:4)
at Fulfilled.when (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\node_modules\systemjs\node_modules\when\es6-shim\Promise.js:930:4)
at ContinuationTask.run (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\node_modules\systemjs\node_modules\when\es6-shim\Promise.js:1040:24)
at Scheduler._drain (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\node_modules\systemjs\node_modules\when\es6-shim\Promise.js:97:19)
at Scheduler.drain (MY_FOLDER\aurelia\aurelia-typescript-simple\node_modules\jspm\node_modules\systemjs\node_modules\when\es6-shim\Promise.js:62:9)
at process._tickCallback (node.js:442:13)
at Function.Module.runMain (module.js:499:11)
Could be related to this: https://github.com/jspm/jspm-cli/issues/610

Looks like this issue could be related to my cygwin installation: Node.js Cygwin not supported
Maybe it cannot enter the interactive prompt.
Using jspm init -y worked but it is not mentioned in most tutorials.

Related

How can I solve this problem of installation xampp on fedora?

When I run xampp on fedora this error is showing up on application log
Starting Apache Web Server...
Exit code: 8
Stdout:
apache config test fails, aborting
Stderr:
httpd: Syntax error on line 522 of /opt/lampp/etc/httpd.conf: Syntax error on line 10 of /opt/lampp/etc/extra/httpd-xampp.conf: Cannot load modules/libphp7.so into server: libnsl.so.1: cannot open shared object file: No such file or directory
can anyone tell me how can I solve this?
it seems you're missing libnsl. install it through this command:
sudo dnf install libnsl
In case this doesn't work you can then download it manually:
Visit https://pkgs.org/
In the search box (pkgs.org of course) type libnsl.so.1 and choose the appropriate OS. The version shown might be higher e.g libnsl-2.28-9.fc29.x86_64.rpm, but it doesn't matter, the file needed is also included in this very package.
In the terminal, navigate to the directory where the .rpm was downloaded.
Type the following command to install it:
sudo rpm libnsl-2.XX-X.fc29.x86_64.rpm
Upon completion everything should be working fine.
A quick Google search returns this: https://www.reddit.com/r/Fedora/comments/8hlhlv/xampp_with_fedora_28/
The suggested fix is installing libnsl from this source:
https://www.rpmfind.net/linux/rpm2html/search.php?query=libnsl.so.1%28%29%2864bit%29&submit=Search+...&system=fedora&arch=

Constant error when writing in files in create-react-app based project in WebStorm

I am constantly getting an error from babylon.js (which I'm not sure I'm even using?) in my "Run" terminal in WebStorm.
I get the following error:
cmd.exe /D /C call C:/Users/Jens/IdeaProjects/Vaskemaskine/WashingmachineFrontend/vaskemaskine-app/node_modules/babel-core/node_modules/.bin/babylon.cmd --source-maps --out-file strings-compiled.js --presets es2015 C:\Users\Jens\IdeaProjects\Vaskemaskine\WashingmachineFrontend\vaskemaskine-app\src\strings.js
fs.js:549
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open 'C:\Users\Jens\IdeaProjects\Vaskemaskine\WashingmachineFrontend\vaskemaskine-app\src\--source-maps'
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.fs.readFileSync (fs.js:397:15)
at Object.<anonymous> (C:\Users\Jens\IdeaProjects\Vaskemaskine\WashingmachineFrontend\vaskemaskine-app\node_modules\babel-core\node_modules\babylon\bin\babylon.js:13:15)
Occasionally I will also get an error in a popup in WebStorm:
Cannot save C:\Users\Jens\IdeaProjects\Vaskemaskine\WashingmachineFrontend\vaskemaskine-app\src\strings.js.
The file left unchanged.
Your changes were written to strings.js___jb_tmp___.
Not sure if that is related or not.
I tried googling around, but no one seems to be having the same problem as me. Anyone has a clue about what is going on? I haven't configured the scripts delivered with create-react-app, other than "ejecting" out.

Cannot generate new REST datasource with Strongloop

I'm new to Loopback, was following this page here: https://docs.strongloop.com/display/public/LB/REST+connector
$ npm install loopback-connector-rest --save
$ slc loopback:datasource
? Enter the data-source name: testrestDS
? Select the connector ...
> REST Services (supported by StrongLoop)
And then I get this error:
events.js:154
throw er; // Unhandled 'error' event
^
TypeError: Cannot set property 'facetName' of undefined
at exports._extend (util.js:770:21)
at module.exports.yeoman.generators.Base.extend.dataSource (/usr/lib/node_modules/strongloop/node_modules/generator-loopback/datasource/index.js:169:18)
at /usr/lib/node_modules/strongloop/node_modules/yeoman-generator/lib/base.js:430:16
at processImmediate [as _immediateCallback] (timers.js:383:17)
I've tried a couple other connector types in the generator and they work (like Mongo even though I don't have that connector installed).
Ubuntu 14.04 64-bit
node v5.7.1
npm v3.6.0
slc v6.0.0
loopback v2.27.0
loopback-connector-rest v1.10.2
I got the same error on my command line, but not in my Docker container based on the strongloop/node image.
In both cases strongloop v6.0.0 but on different versions of node (v0.10.25 versus v0.10.38 in the Docker container) with a different version of generator-loopback (1.16.2 versus 1.20.5 in the Docker container).
I suspect that you need to upgrade to resolve this issue.

Mean install fails

ME$ mean init app
? What would you name your mean app? app
/usr/local/lib/node_modules/mean-cli/node_modules/inquirer/node_modules/rx/dist/rx.js:579
throw e;
^
TypeError: undefined is not a function
at Object.exports.checkNpmPermission (/usr/local/lib/node_modules/mean-cli/lib/utils.js:70:3)
at Array.checkPermissions (/usr/local/lib/node_modules/mean-cli/lib/install.js:36:11)
at handleItem (/usr/local/lib/node_modules/mean-cli/node_modules/async-series/index.js:14:13)
at series (/usr/local/lib/node_modules/mean-cli/node_modules/async-series/index.js:30:3)
at Object.exports.init (/usr/local/lib/node_modules/mean-cli/lib/install.js:14:3)
at exports.init (/usr/local/lib/node_modules/mean-cli/lib/cli.js:836:11)
at PromptUI.completed (/usr/local/lib/node_modules/mean-cli/lib/wizard.js:43:5)
at PromptUI.onCompletion (/usr/local/lib/node_modules/mean-cli/node_modules/inquirer/lib/ui/prompt.js:69:10)
at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.completed (/usr/local/lib/node_modules/mean-cli/node_modules/inquirer/node_modules/rx/dist/rx.js:1977:12)
at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onCompleted (/usr/local/lib/node_modules/mean-cli/node_modules/inquirer/node_modules/rx/dist/rx.js:1914:14)
ME$
I do not know how to troubleshoot this.
Further Details
OS:Yosemite
prerequisite Install:$ npm install -g mean-cli
It seems you are having some permission issues with the "npm".Did you install the mean using "npm install -g mean-cli" ?.

show error line and file when compile coffeeify

How to make browserify show error line and file on compile:
browserify -t coffeeify mainPage_browserify.coffee > main.js -d
The current output don't give this information. So it is hard to debug:
⏎
Error: Cannot find module 'throw' from '/allProjectsPath/project/public/javascripts/map'
at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:50:17
at process (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:119:43)
at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:128:21
at load (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:60:43)
at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:66:22
at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:21:47
at Object.oncomplete (fs.js:107:15)
❯ browserify --version ⏎
5.12.1
I was interested in this by myself, so I had a quick peek into source code and run debugger. It looks like that errors from transforms are basically swallowed when using command line browserify.
Errors from coffeeify are passed using event emitter on the stream...
https://github.com/substack/coffeeify/blob/master/index.js#L35
These are handled by Browserify only if the bundle call was made with callback present...
https://github.com/substack/node-browserify/blob/master/index.js#L619
Unfortunately callback is not passed when running the command line...
https://github.com/substack/node-browserify/blob/master/bin/cmd.js#L55