FAQ Database Discussion Community

Make NPM remove module deleted from package.json, ie reflect the state of package.json

If I remove a dependency in package.json, is there a command I can run to make NPM delete it from the node_modules directory? I know I can delete it from NPM directly with npm uninstall <module> --save But I think it would be easier if I could just remove the...

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...

How to start node server and export NODE_PATH (with npm start or inline command)

Before starting the server, I need to export ('set' actualy, I'm using Win7) NODE_PATH variable. I tried to do it with this command (not working even in command line): set NODE_PATH=./ && node server.js and for package.json: "scripts": { "start": "set NODE_PATH=. && node server.js" }, But it's not working....

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":...

Gulp: Do i need the package.json?

Is there any need for the package.json file when I am running a Gulp script? I just renamed it, and the Gulp-Script is still running - so can I delete it, or is it needed for anything? Thank you very much!...

Receive parse error for package.json. Validates as valid json

I'm trying to create my first yeoman generator and I'm getting the following error when I run yo to create my project. npm ERR! install Couldn't read dependencies npm ERR! Darwin 14.0.0 npm ERR! argv "node" "/usr/local/bin/npm" "install" npm ERR! node v0.10.35 npm ERR! npm v2.1.14 npm ERR! file /Users/derek/Development/personal_projects/stylus-generator/work/package.json...

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...

Running package.json dependencies when dependencies are not global

Let's say I have a package.json with "rimraf" as a dependency in it. "rimraf" is not installed globally. What command, from the command prompt, can I enter to run "rimraf"? Something like "npm run-command rimraf?"

“No readme data” with package.json not in root folder

I have a directory structure with a Build and a Source Folder. Alls things Grunt, npm, bower and composer live in the Build Folder, All sources live in the Source Folder and all Things Project (i.e. README.md) live in the root of the project. - myProject + Build Gruntfile.js bower.json...

npm outdated does not respect caret notation of package.json

Using a package.json file with the following "devDependencies": { "grunt": "^0.4.5", "grunt-concurrent": "^1.0.0", "grunt-contrib-jshint": "^0.10.0", "grunt-contrib-watch": "^0.6.1", "grunt-dev-update": "^1.1.0", "grunt-jasmine-node-new": "^0.3.2", "grunt-node-inspector": "^0.1.5", "grunt-nodemon": "^0.4.0", "grunt-npm-install": "^0.1.0" } I get an npm outdated output that looks like Why is Wanted not 0.11.0? Doesn't "grunt-contrib-jshint": "^0.10.0" mean any version greater than...

Manage file dependencies with NPM

I'm working on a large front end application with a medium sized team. Until now, we've been using requirejs and AMD modules to manage our ~500 file project. We've recently made the decision to migrate to commonjs and use NPM as our package manager for various reasons. Here is my...

Does a Node.js package.json need to be at the root of the repository?

I have a Node.js package that currently resides in a subdirectory of a GitHub repository. I can currently publish it without setting the repository field, but then my users will get a warning and there is less useful information on the Node Package Repository page than their could be (issues...