npm,bower , 'Object.keys called on non-object' error when upgrading bower from version 1.3.12 to version 1.4.1

'Object.keys called on non-object' error when upgrading bower from version 1.3.12 to version 1.4.1


Tag: npm,bower

After I ran bower install, I got a warning:

│ Update available: 1.4.1 (current: 1.3.12) │
│ Run npm update -g bower to update.        │

If I follow the instruction and run the update command, I got a list of 'Object.keys called on non-object' error

> npm update  -g bower                                                                                                                                                 ✭ ✱
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "update" "-g" "bower"
npm ERR! node v0.10.35
npm ERR! npm  v2.1.14

npm ERR! Object.keys called on non-object
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <>
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "update" "-g" "bower"
npm ERR! node v0.10.35
npm ERR! npm  v2.1.14

npm ERR! Object.keys called on non-object
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <>


Remove the ~/.npm and run npm install -g bower instead


404 on api authenticate for node restful

I am using this tutorial to learn about node with restful authentication. I am getting 404s in the route when I post at this http://localhost:8090/api/authenticate Here is the response that I get Cannot POST /api/authenticate and the console shows 404 POST /api/authenticate 404 2.465 ms - 30 here is...

Combine js files from different directories via config using grunt

I'm using grunt and sass and I'm looking for a sass-like feature to import any JS file I like to and combine them to 1 file via some config depending on the directory I am in. Example directories: startpage file1.js file2.js importjs.json page1 file3.js file4.js importjs.json global global1.js global2.js Each...

Difference between bower, browserify, requirejs, webpack?

I'm used to simple and small JS projects where the JS dependencies are concatenated and minified as part of the build process using something like gulp and the script tag in the html contains the hardcoded path to that minified JS file. It's not elegant and probably has several disadvantages,...

Load libraries with wiredep

I am doing my first steps in AngulaJS. And i try load dependences via Bower and a Gulpfile. I have instaled wiredep, gulp-inject and bower. In my Gulpfile.js i have defined the next tasks: 'use strict'; var gulp = require('gulp'); var inject = require('gulp-inject'); var wiredep = require('wiredep').stream; gulp.task('inject', function()...

How to create web client application with nodejs and npm like angularjs tutorial

I am new to nodejs, npm also angularjs. I have read and tried the angularjs tutorial project hosted on, which for me is really exciting because it shows how easy to maintain the modules with bower, testing with jasmine and karma and perform e2e with protractor using npm command,...

jquery appears in browserify bundle.js but not working in browser

I'm following this short tutorial on getting started with Browserify Getting Started with Browserify. Despite following everything exactly jquery isn't working on the page when bundled,ie. the button element in my app.js code below is not appended to the body. Have checked everything I can think of using chrome dev...

Gulp / Bower - maintaining consistency

I feel like im missing something stupid here, can someone explain to me why i can't pull in .bowerrc into gulp? The file structure and process should be extremely simple: global.js "use strict"; var gulp = require('gulp'); var bowerRC = require('../.bowerrc'); module.exports.getBowerRC = function() { return console.log(JSON.stringify(bowerRC)); } .bowerrc {...

React from NPM cannot be used on the client because 'development' is not defined. The bundle was generated from Webpack

I'm creating a React Node.js app and I'm trying to generate a Webpack bundle containing the React source code I loaded from NPM. However, it seems that the React code from NPM cannot be used directly in the client. It triggers this error: Uncaught ReferenceError: development is not defined The...

What is the meaning of npm view dependencies output?

When executing npm view [email protected] dependencies the dependencies are not displayed uniformly. What does it mean if a dependency is marked with a single quote and green font? What does it mean if a dependency is in a white font? ...

Bower: Install package that doesn't have bower.json file

I'm trying to get Bower to install this javascript: I use: bower install [email protected]:markmalek/Fixed-Header-Table.git --save It installs the package into bower-components, and even adds it to my project's bower.json, but it doesn't add the to my html. I'm guessing it's because that particular git repo doesn't contain a bower.json...

Handlebars does not output anything

At the start of the file I define Handlebars etc.: <!-- build:js(.) scripts/vendor.js --> <!-- bower:js --> <script src="bower_components/jquery/dist/jquery.js"></script> <script src="bower_components/bootstrap/dist/js/bootstrap.js"></script> <script src="bower_components/handlebars/handlebars.js"></script> <!-- endbower --> <!-- endbuild --> At the end of the index.html-file I pull in my Handlebars-file: <!-- build:js({app,.tmp}) scripts/main.js --> <script...

Error while updating to latest pm2

I tried updating pm2 with "npm install [email protected] -g" (Cent OS 6) but received the following error. Now, i am no longer able to use "pm2 list" (it says command not found). Your help will be highly appreciated. npm ERR! Linux 2.6.32-042stab094.8 npm ERR! argv "node" "/home/username/local/bin/npm" "install" "pm2" "-g"...

Node Global Install Error

I'm trying to make a Node module that, when installed with -g, will run by a single command from a terminal. All tutorials show its pretty straightforward, so I don't know what I'm missing. Here's what I've done: Package.json: ... "bin": { "myapp": "./lib/myapp.js" }, ... npm publish npm install...

Does an existing gruntfile need to be edited? What is the common workflow?

For an existing app, is there a proper protocol for specifying bower packages such that they're handled correctly when running "grunt build"? Does an existing gruntfile need to be edited? What is the common workflow?

How to include jQuery to my app?

I'm developing the app based on angular gulp generator. I want to use the angular-ui and bootstrap components. I am able to build the application, but generated index.html file contains script tags for boostrap, angular ui but jquery is missing here. I have jquery in bower.js file and I ran...

Cannot find a submodule imported inside a module installed from npm

I would like to use a node.js module from using browserify. I did install the module locally at my working directory. In that directory, I created a javascript file, main.jsx var React = require('react'); var ReactDatalist = require('react-datalist'); var options = ['apple','orange','pear','pineapple','melon']; React.render(<ReactDatalist list="fruit" options={options} />, document.body); Then, I...

lodash npm distribution in browser

I'm using lodash in my tests, Not using webpack or browserify (don't need to). I found that the default npm build differs from what's in bower. I could of course use bower version, but I'm curious if I can use npm's instead (it's already there for Gulp). For bower I...

npm install error not installing BrowserSync package

Trying to install BrowserSync I've followed the steps to install the package through the command line, installed node.js and then I went on to install npm through the command line. Now when I try to install browser-sync with the following line npm install -g browser-sync you will see it is...

Node js can't require modules installed globally in OS X

I installed module by sudo npm install -g xxx in OS X, and the command echoes the module was installed in /usr/local/lib/node_modules/xxx. But the require('xxx') still fails claiming `Cannot find module 'xxx'. Only installing the module locally again by sudo npm install xxx can fix the error. Anything need to...

Is it possible to install npm package only if it has not been already installed?

Is it possible to install npm package only if it has not been already installed? I need this to speed up test on CircleCI, but when I run npm install [email protected] etc. it always downloads things and installs them from scracth, however, node_modules folder with all modules is already present...

return a js object from a javascript function that is called from a node cpp addon

I am tyring to create and return a javascript function object from a function that is called from a c++ node addon. The object was getting created, but wasn't getting returned by the function. callback function that creates an object named cursor var callback_fn = function(record){ var res = new...

NPM : how to just run post-install?

Just a simple question : in my node.js project, how could I just run the postinstall script, without running install before ? FYI, this is my package.json : { "name": "gestionclientjs", ..., "dependencies": { ... }, "repository": {}, "devDependencies": { ... }, "engines": { "node": ">=0.10.0" }, "scripts": { "test":...

So I have angular from bower, now what?

I just started a new project, these are the exact steps I have taken. foundation new project_name --libsass bower install angular --dev grunt build All good, the sass files are compiling, angular is setup under bower_components inside the angular folder, but wait..... Now I need to add Angular's ng-resource module....

Strange npm behavior when installing packages like grunt

I run the following command in my bash and I get the related results: mer[email protected]:~$ sudo npm install -g grunt-cli /usr/local/bin/grunt -> /usr/local/lib/node_modules/grunt-cli/bin/grunt [email protected] /usr/local/lib/node_modules/grunt-cli ├── [email protected] ├── [email protected] ([email protected]) └── [email protected] ([email protected], [email protected]) and [email protected]:~$ grunt /usr/bin/env: node: No such file or directory I also have try to install...

How to let Webpack require a root node_module instead of an child package?

I have installed backbone and backbone.babysitter trough npm. When I use backbone in my scripts like this: import Backbone from "backbone"; It loads the installed backbone version 1.2.1. This works fine until I want to use backbone.babysitter. When backbone.babysitter loads it needs to add properties to backbone itself. But the...

Npm package upgrade notification availlable?

I wrote a node package which contains breaking changes in the next release. Does there exist a way to notify developers about that via console while upgrading via npm?

Node JS NPM modules installed but command not recognized

Node JS and NPM was working well before. Recently I have re-installed the Node JS, NPM and the problem started. After I install a module like example npm install -g bower, the module gets installed successfully but bower -v gives 'bower' is not recognized as an internal or external command,...

node user model is vomitting

I am trying to get my hands dirty with making node api following this tutorial problem is that when I execute $ nodejs server.js I get this error { [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' } js-bson: Failed to load c++ bson extension, using pure JS version {...

Error: EMFILE: too many open files

Using nw.js, I am just trying to save images in an array of img elements with different random names. But having a few errors, is something wrong with my code? for (i = 0; i < imgs.length; i++) { request(imgs[i].getAttribute('src')).on('error', function(err) { throw err }).pipe(fs.createWriteStream('data/imgs/' + randomString)) } imgs[] is...

MongoDB : querying documents with two equal fields, $match and $eq

What is the best way to return all documents in a collection if I want document.a == document.b? I've tried db.collection.aggregate([ { $match: { $eq: [ '$a', '$b' ] } }]) But it returns with no errors or results, because I assume it is literally matching strings "$a" and "$b"....

Using npm to install grunt on nodeenv results in findup-sync error

After establishing a node virtualenv using nodeenv, I use source /bin/activate to switch into the correct directory, update npm, and execute npm install -g grunt or npm install -g grunt-cli and I recieve the same error: npm ERR! Linux 3.13.0-53-generic npm ERR! argv "node" "/home/{redacted-home-dir}/NodeProjects/vue/bin/npm" "install" "-g" "grunt-cli" npm ERR!...

Package.json not found error when updating using npm-check-updates

I'm trying to update my node packages/modules and a lot of people (many from StackOverflow) recommended 'npm-check-updates' so I downloaded via npm and ran it. It gave me this error and I'm not sure what's wrong. Is something wrong with my PATH variable in system settings or something? I can't...

Node.js app giving ERR_EMPTY_RESPONSE

I'm having serious issues with an app I am building with Node.js, Express, MongoDB and Mongoose. Last night everything seemed to work when I used nodemon server.js to `run the server. On the command line everything seems to be working but on the browser (in particular Chrome) I get the...

npm installs packages and dependencies in the project root directory

I switched from Windows to Mac. When I'm trying to install npm modules, the packages and their dependencies are created inside the project root directory. On Windows the module was installing into ./node_modules, with all dependencies inside module folder. Is there something I need to configure to make it work...

jsx command not found on mac terminal

Problem: I execute the following command from the macintosh terminal: $ jsx --watch src/ build/ I recieve the following output error from the terminal: -bash: jsx: command not found Relevant information: I am following the following tutorial: I executed the following command from the tutorial with positive output: $...

Created a package.json file, but getting dependency errors when running npm install

I know this is a common question and I tried researching on here, but none of the answers have seemed to help me thus far. I am following this tutorial to learn node, and after I try to install the package.json I received the following errors: npm ERR! install Couldn't...

Error when i try to install npm with putty

here is what i get when i try to execute this command (the 3rd command - in ec2 amazon) The next step is to install NPM(Node package manager). Type the following commands: 1. git clone 2. cd npm **3. sudo make install** and here is the error i get:...

npm update doesn't update the package

I've run into a issue where I try to update a package on a remote server, specifically the mongoose package. If I run npm mongoose --version it will return a version number of 1.3.10. However in package.json the version specified is ^2.7.4. I've tried to run npm update and it...

Grunt tasks stuck in endless loop

Working on putting together a base Gruntfile.js for some upcoming projects. Starting in on a new computer so everything has been a fresh build. Installed Node and NPM using Homebrew, and then installed Grunt globally, as well as in my local directory. Here is my package.json: { "name": "timespent-prototype", "version":...

Revert to state before installing a bower component

I just installed angular-pdf with Bower, and in the installation process, it asked me Unable to find a suitable version for angular, please choose one: 1) angular#>=1 <1.3.0 which resolved to 1.2.28 and is required by angular-bootstrap#0.12.0 2) angular#1.3.15 which resolved to 1.3.15 and is required by angular-cookies#1.3.15, angular-pdf#0.4.0 3)...

sass file not compiled by gulp

I want to switch from less to sass so I installed gulp-sass with npm and modified my gulpfile to compile sass instead of less (nothing else changed). Sadly gulp doesn't compile my .scss file to css and after googling and trying all i could think of it still doesn't compile....

NPM Error: self signed certificate in certificate chain

I am following the Angular 2 quick start guide and I'm stuck right at the beginning of it. My company is filtering our network connections and modifying SSL negociation. In a man in the middle style they assign a self signed certificate as the CA of the destination's certificate. Therefore...

how to integrate a lodash custom build into a project

lodash supports custom builds with only a subset of the functionality / size. Creating a custom build is a breeze with lodash-cli. What's the recommended way to take this custom build and integrate it into the project? (using npm / browserify). Do I create a custom build command that creates...

Proper npm install --save behavior?

All documentation I have seen indicates that using --save argument with npm install should update the dependencies in package.json. This does not work for me. Packages install successfully without any error in the npm console output, but `package.json' remains unchanged. What am I missing? I have seen nothing in my...

NPM Error Parsing Json, Unexpected Token

I'm trying to install grunt, but no luck. npm install -g grunt-cli --registry gives this error: npm ERR! registry error parsing json npm ERR! Darwin 14.3.0 npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "grunt-cli" "--registry" "" npm ERR! node v0.12.4 npm ERR! npm v2.10.1 npm ERR! Unexpected token <...

VS 2015 RC - Trying to fetch local plugin from remote registry

I have a local plugin, which I'm trying to install to a Cordova project. Adding it through VS works like a charm, but when I'm building it, plugman tries to retrieve the plugin from the registry (npm http GET[Plugin]/[Version]) and the build fails, because this plugin only exist locally....

How to load the project into Github

I need to load my project into Github. So I use GitHub for windows to do it, and I have a problem, when I do it, GitHub writes me "Commit is failed". My project uses bower and nodeJS, and I understand that problems is about it, cause I download pure...