Nuclide + Atom remote development des not work on Ubuntu 16.04 - node.js

I trying to start Nuclide + Atom with remote development.
I've installed Nuclide via Package manager on Atom and install Nuclide Server (Ubuntu 16.04)
npm install -g nuclide
My first trouble was:
nohup: failed to run command 'node': No such file or directory
in nuclide-server-start log file, but i solve it by nodejs vs node on ubuntu 12.04
(don't think this right... :) but it works for me)
And i got a second trouble:
/usr/local/lib/node_modules/nuclide/pkg/nuclide-server/lib/nuclide-main.js:20
const {__DEV__} = require('../../nuclide-node-transpiler/lib/env');
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
in nuclide-server-start log file.
when i installing nuclide-server by npm it tells me
WARN engine nuclide#0.208.0: wanted: {"atom":">=1.14.1","node":">=6.5.0"} (current: {"node":"4.2.6","npm":"3.5.2"})
may is that a reason of my troubles?
Somebody help! :)

First i tried to update my nodeJS from npm:
$ sudo npm install -g node
and i got an answer:
npm WARN deprecated node#0.0.0: To update or install node, go to http://nodejs.org/
/usr/local/lib
└── node#0.0.0
then i try some way to update my nodeJs, described here: https://github.com/kevincobain2000/instagram-bot-api/issues/1
$ sudo npm cache clean -f && sudo npm install -g n && sudo n stable
npm WARN using --force I sure hope you know what you are doing.
/usr/local/bin/n -> /usr/local/lib/node_modules/n/bin/n
/usr/local/lib
└── n#2.1.4
install : node-v7.6.0
mkdir : /usr/local/n/versions/node/7.6.0
fetch : https://nodejs.org/dist/v7.6.0/node-v7.6.0-linux-x64.tar.gz
######################################################################## 100.0%
installed : v7.6.0
and after that nuclide-server-start was successfully started! :)

Related

Truffle Fails on Start After Install

I installed Truffle just fine, but I can't call it without getting the following error:
/usr/local/lib/node_modules/truffle/build/cli.bundled.js:98908
function VM (opts = {}) {
^
SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
System Spec:
uname -a
Linux 7ed9621f5250 4.1.12-103.7.1.el7uek.x86_64
NodeJS v4.2.6
npm v3.5.2
Install commands used:
apt-get update
apt-get -y install curl nodejs npm
ln -s /usr/bin/nodejs /usr/bin/node
npm install -g truffle
I can't find any docs or posts on this in order to troubleshoot. Please help. Thanks.
I was also stuck in this. I followed this which work for me, hope it also works for you.
Remove node and npm completely. Install fresh node and npm using :
wget https://nodejs.org/dist/v8.8.0/node-v8.8.0-linux-x64.tar.gz
sudo tar -xf node-v8.8.0-linux-x64.tar.gz --directory /usr/local --strip-components 1
node --version
npm --version
sudo npm install -g truffle
mkdir truffle-proj
cd truffle-proj
truffle init

angular cli not working on windows 10

I have just reinstall node.js, npm and angular-cli but this last one does not work on my PC running on Windows 10. The version of node.js is 8.1.2, the version of npm is 5.0.3. I installed angular-cli with the command line npm install -g #angular/cli. Now when I try any command line beginning with ng I have the error:
module.js:487
throw err;
^
Error: Cannot find module '#ngtools/json-schema'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Users\Raphaël\AppData\Roaming\npm\node_modules\#angular\cli\models\config\config.js:6:23)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
Any idea what is wrong?
Shot in the dark, but I heard of -g installs interfering with local angular cli. However, this appears to just be a missing module from the download, maybe just a package lost. Try to uninstall and re-install again
I'm also on Windows 10. Node 8.1.4 and npm 5.2.0
What worked for me was following the steps from an issue thread I found on github: https://github.com/angular/angular-cli/issues/4425
. The link describes the following steps:
Uninstall angular cli
npm uninstall #angular/cli -g
Install rxJS
npm install rxjs -g
Cleared cache
npm cache clean
Manually deleted content in
%AppData%\npm\node_modules
Installed angular cli npm install
#angular/cli -g
Try downgrading node to v7 and npm to v4 then run:
rm -rf node_modules dist
npm cache clear --force
npm install
There are also some threads mentioning the removal of package.lock which is a new part of npm#5. Furhtermore it is worth checking you typescript version ensuring it is > 2.2.0.

Ionic wont start after npm install ionic

Im on osx. I had a development with node, npm and ionic. Everything worked.
I accidentally run this command:
npm install -g ionic
After that Ionic is not working anymore. if I try to create a project or start an existing one I got this error:
Caught exception:
Error: Cannot find module 'inherits'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/glob/glob.js:42:14)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
npm -v gives:
3.10.8
node -v gives:
v6.4.0
ionic -v
gives the same error message as above.
Im not sure if I installed node/npm with brew or what else. Any ideas?
in my case , uninstalling and reinstalling the ionic worked .
1.npm uninstall -g ionic cordova
2.npm install -g ionic cordova
3.npm update minimatch
4.try reinstalling ionic using ionic#latest
This is because the module 'inherits' is missing which may be a problem with npm.
I'll simply suggest uninstalling and installing again as you may have downloaded corrupt/incomplete files.
On MacOS/Unix:
brew uninstall npm
sudo rm -rf /usr/lib/node_modules/
brew install npm
Then retry installing ionic
npm uninstall -g ionic
npm install -g ionic
Try again by adding “read and write” permission to your project root folder
Like
Ionic is my project root folder and under the ionic folder i have a app named ionicapp

Ionic installation after Ionic2 installation

I tried to install Ionic2 with no success, so I decided to go back to Ionic but during the process something went bad and I can't re-installl the ionic and cordova.
after sudo npm install -g cordova ionic, I tried to run ionic and got:
xx#xxx:~/dev$ ionic info
module.js:328
throw err;
^
Error: Cannot find module 'xmlbuilder'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/xml2js/lib/xml2js.js:12:13)
at Object.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/xml2js/lib/xml2js.js:436:4)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
my versions are:
xx#xxx:~/dev$ npm -v
2.14.12
gal#xxx:~/dev$ nodejs -v
v0.10.25
xx#xxx:~/dev$ node -v
v4.2.6
I also encountered that issue. What I did was:
$ cd /usr/local/lib/node_modules/ionic/
$ npm install xmlbuilder
You may also use sudo
It just happens that xmlbuilder is a dependency of xml2js and cannot load the module because it wasn't included in the ionic's package.json of the upon installing ionic.
What worked for me was to use
sudo npm install -g ionic#beta cordova
to install the V2 version according to link.
Cleaning the npm cache helped in my case. The actions required were:
Install a stable version of nodejs depending of your OS follow these instructions.
Remove all installed versions of cordova and ionic:
sudo npm uninstall -g ionic cordova bower
Critically, clean the npm cache:
npm cache clean
Install from scratch:
sudo npm install bower cordova ionic -g
NOTE: Do not install nodejs version from Ubuntu 14.04 LTS repository because is outdated.
Have you tried to
sudo npm uninstall -g ionic
sudo npm install -g ionic
I faced similar issues while downloading ionic 2. Try to install node version 4.2.3 and cordova version 5.4.1 first and then install ionic
For ionic v2, npm install -g ionic#beta
For ionic v1, npm install -g ionic
You should check your version of nodejs. Make sure that it's version 4. If not, uninstall nodejs and install ver 4.
Goodluck!
P/s:
Uninstall:
sudo apt-get remove nodejs
Install:
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs

Nodejs and npm error. modules missing

module.js:340
throw err;
^
Error: Cannot find module 'vinyl'
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> (/home/morpheyesh/debugall/web-starter-kit/node_modules/gulp/node_modules/gulp-util/lib/File.js:1:80)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
I have major issues with node.js. I try to run any nodejs application or gulp, i get this error, I try to install every module , I keep getting the same error and it requires a new module. Is there anyway where I can install all the modules?
Plus, I have install nodejs through npm? how to install system wide? Gulp is been installed system wide(global). What is causing this error?
nodejs -v gives v0.10.30
`npm -v gives 1.4.21
gulp 3.8.7
I am working with the google web starter kit. I installed nodejs using apt-get, then install sass, then installed gulp, then npm. Is there a way where I can remove all these and install all of it system wide?
Try updating your global gulp installation:
sudo npm install --global gulp#latest
It sounds like everything is (was?) FUBAR for a while there. If you have not yet solved these problems, here's what I would recommend.
First, the official (Debian/Ubuntu) packages are a bit behind latest node. I would recommend uninstalling the packages nodejs and nodejs-legacy and following the instructions here to get the latest versions (packaged and published by nodesource): https://github.com/nodesource/distributions#usage-instructions
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs
Now you will have a recent node (0.10.35) but an out-of-date npm. Upgrade your npm:
npm install -g npm#latest
Things should now work for you; you should be able to run npm install in your project directory and all dependencies will be installed correctly.
One thing to be wary of is that you should never run npm update or npm update -g. This does not update the current (or all global) packages, as one might think.
Try this for install all plugins required by gulp :
npm install gulp-jshint gulp-sass gulp-concat gulp-uglify gulp-rename --save-dev
Source : http://travismaynard.com/writing/getting-started-with-gulp
For me uninstalling gulp and then reinstalling it worked fine. This is with node v5.0.0
sudo npm uninstall -g gulp
npm install -g gulp

Resources