Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
npm Basics > Installing Packages with npm > Managing Dependencies in the package.json File
At 4:56 in the video, I got this code in the terminal:
treehouse:~/workspace$ npm install colors --save
firstname.lastname@example.org install /home/treehouse/workspace/node_modules/bcrypt
make: Entering directory
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 4
make: Leaving directory/home/treehouse/workspace/node_modules/bcrypt/build'
gyp ERR! build error
gyp ERR! stack Error:
make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/nodejs-binary-6.2.2/lib/node_modules/npm/node_modules/nod e-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 4.4.26-1.el7.elrepo.x86_64
gyp ERR! command "/usr/local/nodejs-binary-6.2.2/bin/node" "/usr/local/nodejs-binary-6.2.2/lib/node_modules/npm /node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/treehouse/workspace/node_modules/bcrypt
gyp ERR! node -v v6.2.2
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
The "colors" dependency didn't appear in my package.json underneath "email@example.com".
What went wrong? This "bcrypt" version is more current than what appears in the video ("firstname.lastname@example.org"). Did I miss something in a previous video with the Python version that Workspace is now functioning with?
Dan Kelley & Andrew Chalkley:
Using "sudo" & "--sav-dev wasn't in the lesson. The "bcrypt" is a dependency in the package.json but not a development dependency in the package.json.
In the video, when the instructor types & enters "npm install bcrypt", he gets an error message telling him to use a Python version between 2.5.0 & 3.0.0. Then when typing & entering"python --version", the terminal returns "python 3.4.1" in the instructor's video. I get "python 3.5.0". In the video, the instructor then types & enters "python2 --version" & the terminal returns "python 2.7.5". This is where I didn't know what to do since both "bcrypt" & the Workspace Python version have been updated to more current versions since this video was created. At this point, my code created the above error messages. The email@example.com version has been updated to firstname.lastname@example.org version. I'm not familiar enough with Git or GitHub to know how report the error or bug as it's printed above. Ubuntu Linux is new to me.
Thanks for your reply. I don't know if using "sudo" would have made any difference.
The issue is the different versions of bcrypt & Workspaces Python. Both were updated since the instructor created his video.
All I can do is take notes at this point. I'm using WorkSource Oregon Windows 7 OS computers to do my courses using Treehouse's Workspace as that is what is available to me. I'm new to coding & not very familiar with Ubuntu Linux or using command line codes.
I'm otherwise (since mid-Sept. 2016) using a Windows 10 OS with Command Prompt. Still not sure how to adjust Treehouse lessons using them. It's not knowing what to do when I get messages like what I posted above.