I'm a total newbie to node.
The issue is that after I install a module from nodeschool.io and type the name of the module on the command line, nothing happens and it just returns to command prompt.
I'm using an EC2 instance from AWS in which I ssh from my macbook.
I have apt-get install node.js and installed one of the learning modules from nodeschool.io -- I started with learnyoumode.
From the instructions, it said to simply type learnyounode and you should see a screen which I don't.
It just comes back to the command line.
I have verified it is not an 'X' issue with AWS because when I type 'xclock', the clock does launch.
I think this is an issue with AWS and not the module -- my assumption, TIA
usaims
Related
I have a Node/Angular app which works locally in a Docker instance. For deployment to a Google VM, we have a script which checks out the Git files, compiles them, copies the outputs into an nginx folder and restarts the nginx.
I have (what I thought was) identical setups on two different VMs. I test any changes on the "staging" VM and then if all is working correctly, I run them on the "production" VM.
Yesterday, this system broke. My staging VM pulls, compiles and runs the code without any issues or even warnings. The production VM gives errors during the compilation
The compilation line is
sudo $(npm bin)/ng build --prod --output-path=dist
and the first error I see is
ERROR in : Unexpected value 'AngularFireDatabaseModule in /home/redacted/ng-app/node_modules/#angular/fire/database/angular-fire-database.d.ts' imported by the module 'AppModule in /home/redacted/ng-app/src/app/app.module.ts'. Please add a #NgModule annotation.
So, I saw this question which said I should move import to the declarations section. I did this for AngularFireDatabaseModule and then it would not compile on my (working) staging server, giving me an error
Please add a #Pipe/#Directive/#Component annotation
Which this answer says means I need to move the declaration back to the imports!
My assumption is that my two supposedly identical VMs have something different about them, but I am having difficulty figuring out what.
Is there some kind soul who can help me figure out what the difference is?
Both VMs: Running Ubuntu 20.04.3 LTS (GNU/Linux 5.11.0-1028-gcp x86_64)
Both VMs up to date
Both VMs: node --version
v17.4.0
Both VMs: sudo node --version
v13.14.0
Both VMs: npm -v
8.3.1
Both VMs: sudo npm -v
6.14.4
What else should I be checking for?
OK, I can't be sure what exactly fixed it, but in the end, I had to go into the folder where the compilation was occurring and run
sudo npm update
which seemd to fix the problems. Could've sworn I did that a few times before, but ¯\(ツ)/¯
Leaving this for anyone who is despairing - the simple answers seem to work best
I'm trying to set up Let's Encrypt certificates on an ec2 instance for the first time and have run into an error which I cannot find a resolution for online. I'm using the official certbox nginx guide, and am at the step where I need to install the route53 dns plugin. However, when I run sudo snap install certbot-dns-route53, I get the following error:
error: cannot perform the following tasks:
Run hook prepare-plug-plugin of snap "certbot" (run hook "prepare-plug-plugin": error: error running
snapctl: unknown command `unset'. Please specify one command of: get, restart, set, start or stop)
The only solution I can find online that mentions this issue says to update snap. But snap has already been updated. Anyone familiar enough with snap and certbot on amzn2 to know what I can do here?
A bit more information:
This is running on an ec2 instance running Amazon's Linux 2 AMI (amzn2)
Output for snap --version:
snap 2.36.3-0.amzn2
snapd 2.36.3-0.amzn2
series 16
amzn 2
kernel 4.14.214-160.339.amzn2.x86_64
I have tried to update the core using the commands in the guide, sudo snap install core; sudo snap refresh core and it outputs:
snap "core" has no updates available
I initially installed snap (since it wasn't available simply via yum) following the instructions found here. If you've done that and found this question, uninstall it.
Either switch your instance to a different distro or follow the install guide offered by Amazon here. If you're using nginx, you can simply replace the reference of python2-certbot-apache with python-certbot-nginx. I stopped following after certbot was installed.
I've tried to setup windwos-curses as first step and it completes fine.
python -m pip install windows-curses
Also the following
python -m pip install bpython
does not show any problems.
Unfortunately running bpython results in a
ModuleNotFoundError: No module named 'fcntl'
Does it mean that bpython is not running on Windows 10 or is there another option for the installation here?
Found the solution on their github.
According to #509 Blessings doesn't work on Windows even with the custom curses library. We ought to update the Windows install instructions in the readme and on the site to say that bpython-curses needs to be run instead of bpython. We should also consider making bpython-curses the default on Windows
So, I'm running bpython-curses and it looks good to me (a few commands are not available though).
Unfortunately, there was a bug, namely it deletes the current line and returns back at the start of the history, when I type an underscore or a capital P, but it has been fixed now by Sebastian Ramacher.
Notice also that their home suggests to install an unofficial windows binary for pdcurses, but either way it confirms that you have to launch it by typing bpython-curses on your prompt.
My computer is Win7, first I install strongloop globally, and the result as below:
The result of installing strongloop on my Win7 computer
Then I type "slc loopback" at my prompt, the result made me confused as below:
Failed to running loopback
It says, "slc" is not an internal or external command, nor can it be a running program or batch file. How can I deal with this?
I have an ubuntu server on Amazon and I'm trying to run a node.js program on it. The program has only one line:
console.log('Here I am.');
Nothing gets output and program does not exit.
when I run ps x, I can see one [node] process in STAT D state:
751 ? D 0:04 [node]
The process cannot be stopped with sudo kill -9 751.
Before the problem, the node.js program ran just fine, as did my actual - much more elaborate - node.js program.
I even rebooted the ubuntu server and tried running the one-line test node.js program right after reboot. It hung and did not output anything.
node --version returns
v0.7.6-pre
Any ideas why this happens? Is this a problem related to the Amazon instance, node.js installation or something else? nginx runs just fine on the same server but node.js programs hang as described above.
(as expected, the same code runs just fine on my local mac os x environment)
UPDATE: I reverted back to 0.6.12 stable version but the same problem persists.
Problem solved (kinda).
This is a mystery. I created a new instance on Amazon EC2 ("identical" to the one I had), installed git, nginx, node.js and my node.js program. Everything works correctly now.
It must be that there was something wrong with the instance I had. I just don't understand what it was but since the instance I had had nothing important on it, I just dumped it.
It could be that the cause for the problem was the 0.7.6-pre version I had initially pulled and compiled. Maybe there were some left-overs from that installation that caused the peculiar behavior.
Just for anybody else who comes across this problem, it could be related to this:
"After using yum to upgrade to Amazon Linux AMI 2011.09, t1.micro 32-bit instances fail to reboot."
Updating the 'AKI' on my instance seemed to fix the problem for me.