I followed these steps to build atom on Linux on my own.
After cloning atom, i tried to run script/build. But i get an error "No such file or directory".
Node v0.10.31
Npm v0.10.31
I don't now how can I run these atom-build-script.
After searching, i found a solution to fix this issue.
[1] after installing node via apt, its command is nodejs, not node like its recommended to use these build-script
[1.1] after removing apt's node installation, i build node by my own
[2] run which node, to find out where you install node
[3] to run the build-script: /opt/node/bin/node your-atom-path/script/build
additional information how to fix from atom-github-build-instructions
"/usr/bin/env: node: No such file or directory
If you get this notice when attempting to script/build, you either do not have Node.js installed, or node isn't identified as Node.js on your machine. If it's the latter, entering sudo ln -s /usr/bin/nodejs /usr/bin/node into your terminal may fix the issue."
Related
I am trying to set up the needed environment for a project I am gonna work on. I am not able to run gulp command as expected (as it is told on the getting started page of Gulp).
I am using Linux (PopOS) which is based on Ubuntu and Debian.
So, I have tried to fix it in the local project repo - which was unsuccessful.
Then I decided to create a new project directory and see whether it works. I have done these in the new project file:
$ node -v
v8.10.0
$ npm -v
5.6.0
$ npx -v
9.7.1
$ npm install --global gulp-cli
$ npm install --save-dev gulp
After all these, at the last step, when I do:
$ gulp
-bash: /usr/bin/gulp: No such file or directory
this is what I get.
However, if I do this,
$ node_modules/gulp/bin/gulp.js --version
CLI version: 2.2.0
Local version: 4.0.2
I get some result.
Does anybody see why gulp isn't getting in my binary directory? - Even though I have done the same exact steps that are presented on the official website?
This issue was about npm prefix that defines the directory where npm packages will be installed. Because the gulp binary wasn't in one of the directories that is in PATH variable bash wasn't able to find it. Here you can find details about how to fix.
I recently installed nodejs in a remote centos server following the instruction on https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-a-centos-7-server for installing a package from the node site, since the nodejs that was installed using yum was v 0.something.
The installation went well, and node seems to be working, but only when I execute
/usr/local/bin/node or npm for that matter.
If I try just
node or npm I get the following error:
-bash: /usr/bin/node: No such file or directory
This is a little strange because my PATH does have /usr/local/bin/, and if I do
which node
I get
/usr/local/bin
Here is a copy/paste from the server
[root#v468996 local]# echo $PATH;
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
[root#v468996 local]# /usr/local/bin/node -v
v11.5.0
[root#v468996 local]# which node
/usr/local/bin/node
[root#v468996 local]# node
-bash: /usr/bin/node: No such file or directory
Note I know I can just make symlink on /usr/bin, so I'm not really asking about that, I want to know why node won't run even though it is installed, and in a location within PATH
As #tink said, this seemed to be the shell remembering the old node location.
I installed node.js 8.9.3 and a successfully installed with following message
This package has installed:
• Node.js v8.9.3 to /usr/local/bin/node
• npm v5.5.1 to /usr/local/bin/npm
Make sure that /usr/local/bin is in your $PATH.
I run following command in terminal mac ...
$ $PATH
And i get following return..
-bash: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin: No such file or directory
Q1. What does that last line mean? No such file or directory?
.. after that i run following commands..
$ which node
And following is response
/usr/local/bin/node
and similar for
$ which npm
And following is response
/usr/local/bin/npm
I think everything is fine till now..
Now i installed ...cordova typing..
$ sudo npm install -g cordova
It is installed and the next lines after completing installation i see ..
/Volumes/macHDD/Users/samz/.npm-packages/bin/cordova -> /Volumes/macHDD/Users/samz/.npm-packages/lib/node_modules/cordova/bin/cordova
+ cordova#8.0.0
updated 1 package in 27.977s
Q2. is it successfully installed? if so.. why is this not as global?
when i test typing
$ which cordova
terminal says nothing.. I also tested typing
$ cordova -version or $ cordova --version .. or even if i type
$ cordova create hello com.example.hello HelloWorld
I am "slapped" by terminal :(
-bash: cordova: command not found
...
in the last night. i was successful in installing cordova, and I created 2 test apps.. i was able edit them, even I run those apps on android emulator and on my ios device+emulator.
during building/preparing one of my app, I tried to create one more app project through a seperate terminal instance. And there I saw .. like no cordova.
I terminated first instance where cordova was working.. and reopened terminal to test if this is an issue.. and yes.. it was .. I could never work on cordova again.
Can somebody tell me what is the issue. ?.
it's very irritating now.
Thank you
I don't know how this is resolved..
I reinstalled node, npm, java, cordova (several times), but nothing could resolve.
and today .. i upgraded node9.3.0 from node8.9.3.. but still the same errors.
Now i had..
Muhammads-MacBook-Pro:colors muhammadfarooqi$ node --version
v9.3.0
Muhammads-MacBook-Pro:colors muhammadfarooqi$ java -version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
Muhammads-MacBook-Pro:colors muhammadfarooqi$ npm -version
5.5.1
Muhammads-MacBook-Pro:colors muhammadfarooqi$ cordova -version
8.0.0
i was about to kill myself.. but i found something on the internet with some other issue.. and i run the same command.
sudo rm -rf node_modules
sudo npm install
and then i installed cordova.
and wow... cordova is there :)
i dont' know what exactly was the solution .. I dont' know what this line of code did.. I know the above line removed node_modules and 2nd lines installed npm.. and now I am seeing cordova is running.
Please somebody, if my solution works for anybody, kindly comment. thank you
Your first issue is because you typed just $PATH. This is then expanded to its value, and then the shell attempts to execute it, which is obviously not possible.
To check your current PATH, type echo $PATH instead.
Your second issue is probably due to a partial configuration to use a user-specific global package directory.
By default, packages are installed in /usr/local/lib/node_modules, with symlinks for binaries in /usr/local/bin, which requires root access (sudo). You have at one point configured npm to install in a different directory (~/.npm-packages), but did not include the bin sub-directory in your PATH.
So you need to either finalise the configuration (see https://docs.npmjs.com/getting-started/fixing-npm-permissions for details), or revert to using /usr/local.
I have nodejs and npm installed.
I tested npm -v and nodejs -v it worked, showed the current version.
I used the nodeclipse -p command line in my empty folder to create the project structure, but I received the error: command not found
I uninstalled the nodeclipse with npm uninstall and installed again with sudo npm install and did not work.
I used the root account and run the npm install also did not work.
I don´t found the npm or nodejs references to set the environment variable to set the nodeclipse or config it.
Can anyone help please?
Problem
There is a bug in nodeclipse plugin that recognizes Node.js as node command the Windows installation.
In Linux the nodeclipse plugin tries to find the command node and can not find. Why on Linux, the nodejs command is utilized for the Node.js installed.
printing error in the terminal
paranhos#pc-principal:~/workspace-javascript/react-sample$ nodeclipse -p
/usr/bin/env: "node": File or directory not found
Solution: Create a Symbolic Link
sudo ln -s "$ (which nodejs)" /usr/bin/node
or
sudo ln -s /usr/bin/nodejs /usr/bin/node
Successful result
paranhos # pc-main: ~ $ node -v
v4.4.2
paranhos # pc-main: ~ $ nodejs -v
v4.4.2
paranhos # pc-main: ~ $ nodeclipse -h
Usage: nodeclipse [arguments]
--help Nodeclipse install > is Nodeclipse CLI Installer Help
I also can solve this question, installing the new nodejs version for my linux distro.
Getting ".deb" package directly and following the instructions in the url´s:
https://nodejs.org/en/download/package-manager/
https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
In the version 4.4.7 or latest was Included node and nodejs as command.
Install with npm install -g nodeclipse
then work nodeclipse command
Hope work fine
This is really confusing me. If I type "node -v" into the command line, there is no response - it just gives me the $ prompt again. Trying to install node with sudo npm install nodejs gives the response nodejs is already the newest version.
How can I debug this to find out what's going on?
nodejs -v solved the problem.
In some linux distributions node executable is mapped into nodejs.
Are you trying to print the node version? If yes then try
$ node --version
Node is by default installed on /usr/bin/ directory on linux OS it means it should run with normal user privilege but node include some tools that required Superuser privilege so ...
Instead running
node -v
run
sudo node -v
hope it will work...keep coding