Node Newbie Error – NPM Refusing to Install Package as a Dependency of Itself

I encountered an error and thought I’d post the solution here since it just might happen to you sometime!  Here’s the scenario: I was planning to take the winston npm module out for a spin to try out it’s awesome logging capabilities.  I created a directory called winston to create a project and conduct the test.  What would be more logical than that?  🙂 Next, I ran npm init to create a package.json file hitting my Enter key as fast as it could go to accept all the defaults for this throwaway test project:

Share

Solution for Can’t Ping Raspberry Pi Hostname on the Network

In preparing for my upcoming tutorial which is a beginner’s guide to installing Node.js on a Raspberry Pi 2, I ran into an issue. After getting the RasPi is up and running on the network, I was not able to ping its hostname (raspberrypi, by default) from another machine and find it so I could connect to it through Putty, xrdp, VNC, etc.  After all, I wanted to be able to run headless and disconnect the monitor, USB keyboard/mouse, and still connect to it from another machine on my network. One option was to run ifconfig on the RasPi and take note of the IP address for eth0 (if connected through Ethernet) or wlan0 Read More

Share

Learning through Making – Getting Started with Node.js

Today we are kicking off our LTM (Learning through Making) series of tutorials to delve into the amazing world of Node.js.  We’re going to do some fun projects along the way, but we first need to lay a foundation and get Node.js installed. What is Node.js? As described on Wikipedia, “Node.js is an open-source, cross-platform runtime environment for developing server-side Web applications.” Node.js is awesome because it allows us to build a gamut of applications from highly scalable networked applications to console applications.  Node.js uses a single-threaded event loop model to process events in an event queue which helps it process high amounts of I/O.  This differs from say, the Apache Read More

Share

Launching a Windows Command Prompt in a Folder of Your Choice

Here’s a handy Windows shortcut I use quite frequently for launching a Windows command prompt in a specific folder using Windows Explorer. Thanks to fellow San Diegan Jon Galloway for teaching me this shortcut in one of his Microsoft Virtual Academy classes. Scenario: You are navigating through Windows Explorer to a folder of interest and realize that you need to drop down into a command prompt to run a specific command in that folder. For example, you want to launch Visual Studio Code from the command prompt using code . in that folder.

Share

Learning to Code with CoDrone

I attended the monthly San Diego Hardware Hackers meeting earlier this week with one of my sons.  The presentation was by a local Kickstarter-funded company, Robolink, who is building a device called CoDrone.  The CoDrone (portmanteau of Code and Drone) is geared to help teach kids how to code.  It can be programmed using the Arduino IDE, and can also be morphed into a Rover kit by replacing the propellers with wheels.  Fun stuff!  You will find the lessons plans here if you want to get a deeper view into how it is programmed.  The goal is to teach computer science to kids as young as the fourth grade.

Share