Menu
  • HOME
  • TAGS

Combine js files from different directories via config using grunt

javascript,gruntjs,npm,minify

You can use grunt concat concat: { dist: { src: [ 'startpage/file1.js', 'startpage/file2.js' ], dest: 'startpage.js' } }, ...

Install package.json dependencies globally

json,node.js,npm,gulp

npm install -g or npm install --global when executed within a directory that contains the package.json file will install all the packages as a global package. Use npm ls -g to check exactly where these packages are installed. Add the path that the above command gives to your appropriate shell....

locating path of a file in meteorjs

javascript,node.js,meteor,coffeescript,npm

if the file should be checked in This is the easy case - just place the file in your private directory and access it with the assets api. For more examples, see my blog post on exactly this subject. if the file should exist somewhere else on the server Use...

Why doesn't postinstall run everytime?

jenkins,gruntjs,npm

I was able to fix this by changing the command from an array to a string. "scripts": { "postinstall": "./node_modules/bower/bin/bower install && ./node_modules/protractor/bin/webdriver-manager update" } ...

Can anyone explain what es7 reflect-metadata is all about?

npm,ecmascript-6,jspm,systemjs,es7

'reflect-metadata' is a package that is a proposal for ES7. It allow for meta data to be included to a class or function; essentially it is syntax sugar. Example. Angular 2 ES6: @Component({selector: "thingy"}) @View({template: "<div><h1>Hello everyone</h1></div>"}) class Thingy{}; As you can see there are no semicolons after @Component and...

NPM install -g cordova ionic gives Err -13

node.js,cordova,npm,ionic,hybrid-mobile-app

You're having issues because you don't have write access to the /usr/local directory. A couple options to fix this: Execute the install as root/administrator using sudo sudo npm install -g cordova ionic You can change ownership of the /usr/local directory (and all subdirectories) to the current user, which is usually...

docker build + private NPM (+ private docker hub)

node.js,npm,docker,docker-registry

I found a somewhat elegant-ish solution in creating a base image for your node.js / io.js containers (you/iojs): log in to your private npm registry with the user you want to use for docker copy the .npmrc file that this generates Example .npmrc: registry=https://npm.mydomain.com/ username=dockerUser [email protected] strict-ssl=false always-auth=true //npm.mydomain.com/:_authToken="someAuthToken" create...

Hosting my MEAN stack web app on github pages

node.js,express,github,npm,gh-pages

Github does not host nodejs instances.

automate npm update,bower prune, bower update inside gulpfile as gulp tasks

npm,gulp

you can use plugins like gulp-install to do this... or you can write the task yourself like below var gulp = require('gulp'); var bower = require('bower'); gulp.task('bower', function(cb){ bower.commands.install([], {save: true}, {}) .on('end', function(installed){ cb(); // notify gulp that this task is finished }); }); ...

NPM cluster module and listening on different ports

node.js,express,npm

No you dont need a proxy or to increment the port for forked process. When you use the cluster module. There is a master process who controls forked process. This is the master process who dispatch requests over the other child process. So there is no port conflict, the master...

why `node_modules` idea exists?

npm

Most larger projects that I've worked on have 10-20 dependencies. Having all of them an the root level doesn't make much sense, it becomes harder to write software that can check for outdated modules, rebuild modules, upgrade them, etc. node_modules exists as a standardized way to always have somewhere to...

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

node.js,npm,package.json

npm-check-updates node module requires package.json file to check for the versions that your application is currently using. From the code, it looks for particularly package.json in the current directory to read application dependencies and throws an error if the file is not found. Github Source Code If package.json file exists,...

What is the correct way of adding a dependency to react in your package.json for a react component

node.js,npm,reactjs

For reusable components: Put a react dependency both in peerDependencies and devDependencies Never put a react dependency in dependencies. peerDependencies specifies which version(s) of React your reusable component supports/requires. Currently this also adds React to the list of modules to be installed, but packages listed in peerDependencies will not be...

Programmatically find the 'main' javascript file for libraries on GitHub

javascript,github,deployment,npm

Look at the bower.json file, it has a main section!

Hot to set the title of a Windows console while npm is running?

node.js,windows,batch-file,npm

I think you have to set the title in your packages.json file: "start": "title HTTP Server && http-server -a localhost -p 8000 -c-1" ...

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

node.js,gruntjs,npm

You have maybe a corrupted cache : npm cache clean

how to integrate a lodash custom build into a project

npm,browserify,lodash,package.json

There are several approaches you can take to use a subset of lodash: Use the CLI to generate a custom build (a file within your projects codebase) of the features you need Use npm modules or the lodash modules within your code base (i.e. instead of doing _ = require('lodash');...

cant install ionic-service-deploy

npm,ionic-framework,bower,ionic

the issue was with firewall, just need to do proxy and it will solve the issue

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

node.js,osx,npm

Put this in one of your startup files (most likely ~/.bash_profile): export NODE_PATH=/usr/local/lib/node_modules:$NODE_PATH Start a new shell and try again....

sass file not compiled by gulp

css,node.js,sass,npm,gulp

You are not telling gulp to watch for sass file. On this line: gulp.src('style.css') You are specifying a css file, not a scss file. Change it to : gulp.src('style.css') Also, there is no output route specified. This line: .pipe(gulp.dest('')); Should contain your destiny route, and its currently empty. So, for...

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

backbone.js,npm,webpack

Found a workaround here module.exports = { resolve: { alias: { 'backbone': require.resolve('backbone') } } } ...

NPM : how to just run post-install?

node.js,npm,package.json

You can run individual script entries using npm run SCRIPTNAME: $ npm run postinstall ...

In Meteor: How to use a npm library that should be pulled from a repository?

node.js,meteor,npm

Based on the answer to this issue when I posted it to enter link description here, the only solution is to create a fake meteor package to wrap the new node library. Npm.depends({sendwithus: "https://github.com/whalepath/sendwithusnodejs/commit/41b0d177f6eabf02de2daec9bb2b36daebbfbef4"}); To extend this answer: Just to use a fork of a npm library requires: packages/sendwithus/main.js: SendWithUs...

Error when i try to install npm with putty

amazon-ec2,npm,install,runtime-error

You must install a supported version of node.js (0.10 or 0.12), you can download it here or you can use NVM

Node.js-Express-Strompath No CustomData after immediately after registration

node.js,express,npm,stormpath

What's happening here is this: when you're inside of the postRegistrationHandler code -- customData won't be available automatically by default. The postRegistrationHandler is called immediately after registration before any of the helper functions have fun. What you need to do to make your example work is first 'fetch' the customData...

npm update doesn't update the package

npm,package

So the npm --version command actually returns the version number of npm. What you actually want is to use npm list mongoose to list the version number of the package mongoose (npm list will display a list of all your packages with versions and npm list -g will display a...

Error CordovaModuleLoadError - multi device hybird app in visual studio

ios,git,cordova,npm,visual-studio-cordova

This indicates you are using CTP2 of tools for Apache Cordova. Moving to CTP3.1 or VS 2015 RC should resolve your issue. VS 2015 will also allow you to select the version of Cordova you use though you could see problems with a year old release like Cordova 3.5.0. The...

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

javascript,node.js,npm,reactjs,webpack

Any values passed to webpack.DefinePlugin as strings are treated as code fragments—that is to say, using new webpack.DefinePlugin({ ENV: "development" }); with the code console.log(ENV); results in console.log(development); Instead, you want new webpack.DefinePlugin({ ENV: "\"development\"" }); which will result in console.log("development"); To fix your issue, change your plugins to plugins:...

CordovaModuleLoadError [ '4.3.0' ] - multi device hybird app in visual studio

ios,cordova,npm,visual-studio-cordova

I got my specific issue resolved by reinstalling ALL tools for iOS as mentioned here. Now, Visual Studio will successfully launch the iPhone simulator on the connected Mac device with my Cordova app in it. However, when I try to sudo chown -R $USER ~/.npm or sudo chown -R `whoami`...

Node JS NPM modules installed but command not recognized

node.js,npm,bower

I had this same problem and fixed it by adding the 'npm' directory to my PATH: Right click 'My Computer' and go to 'Properties > Advanced System Settings > Environment Variables'. Double click on PATH under the 'User variables for Username' section, and add 'C:\Users\username\AppData\Roaming\npm' obviously replacing 'username' with yours....

ionic build ios fails with “[TypeError: Arguments to path.join must be strings]”

ios,node.js,npm,cross-platform,ionic-framework

ok, after lot of looking and searching I figured my npm install was messed up. Part of my installs were in /usr/local and few of them were in /User/user.name/npm folders. /Users/user.name/npm was set in the npm config prefix. I had two installs of cordova, one on each folder above. Some...

Npm package upgrade notification availlable?

node.js,npm,packages,software-distribution

I don't think there is a solution to inform the via console, but if your new version is given by an new "major" number, it should not break the code. Breaking example Client dependency: ~1.2.2 Your old version: 1.2.2 Your new version: 1.2.3 The client will upgrade to version 1.2.3....

Node js Express doesn't recognize npm inside projectfolder

node.js,express,dependencies,npm

Thanks to a fellow programmer i managed to track my own problem to a few words it's npm not a environment variable and so we just need to set it on cmd as so: C:\node> set path=%PATH%;%CD% C:\node> setx path "%PATH%" Thank you http://stackoverflow.com/users/4276650/kulwant-singh...

npm install vs. edit package.json and npm update

node.js,npm

If you just do npm install package, it doesn't add it to your package.json. Then, if you want to npm update or publish your package, it won't have all of the required packages. You can also do npm install --save package, which will install and add to your package.json. (see...

Strange npm behavior when installing packages like grunt

node.js,gruntjs,npm,gulp,bower

Ubuntu package nodejs provide a binary as a /usr/bin/nodejs, not a /usr/bin/node, so most of cli tools can't find it. To solve the problem you need to make a symlink: sudo ln -sT /usr/bin/nodejs /usr/bin/node ...

Jenkins build step fails when calling “npm” on mac-os-x Yosemite

node.js,osx,jenkins,npm,vagrant

I found my own solution. The problem was that the PATH although visible in shell was not exported for the Jenkins job, and so, the first workaround, as found here, was to export it in the actual script like so: but this fills like a hack! The right and elegant...

Excluding files for BrowserSync not working

node.js,npm,gulp,browser-sync

I found a solution to my problem. It was actually crashing because of my path declaration. This is what I had before: var client = './src/client/'; var clientApp = client + 'app/'; var server = './src/server/'; var bower = './bower_components/'; var tmp = './.tmp/'; As you can see each path...

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

database,node.js,mongodb,npm,aggregation-framework

Basically, you are trying to perform a self join. An operation not supported by MongoDB. Concerning the $eq operator, as you guessed: By design, the $eq comparison query operator match a field against a value. But the $eq comparison aggregation operator compare the value of two expressions. I don't know...

Proper npm install --save behavior?

npm

This turns out to be an issue with the file encoding. By default Visual Studio encodes JSON files using UTF8+BOM. For some reason, npm does not like this. Installation completes successfully without error, but it fails to write to package.json. I re-encoded to UTF8 using Sublime, and everything started working....

grunt-bower-install won't include my css files

javascript,gruntjs,npm,bower

Done! Just place this in head tag <!-- bower:css --> <!-- endbower --> <!-- bower:js --> <!-- endbower --> And run grunt bowerInstall again...

npm's guidelines on callback errors

javascript,asynchronous,error-handling,callback,npm

What they're trying to say is that you should design your modules so the asynchronous functions don't throw errors to catch, but are rather handled inside of a callback (like in the fs.readdir example you provided)... So, for instance this is what they're saying you should design your module like:...

pm2 list command displaying badly formatted results

node.js,ubuntu,npm,pm2

This is very likely an issue with your Putty character encoding. Please have a look at this Server Fault answer and see if it fixes things for you.

Node.js app giving ERR_EMPTY_RESPONSE

javascript,node.js,mongodb,npm

//The route for getting data for the database app.get("/database", function(req, res) { Entry.find({}, function(err, data) {console.log(err, data, data.length); }); }); //The route for posting data on the database app.post("/database", function(req, res) { //test new post var newMonth = new Entry({date: '1997-10-30', link: 'https://wwww.youtube.com/'}); newMonth.save(function(err) { if (err !== null) {...

jsx command not found on mac terminal

node.js,npm,reactjs,jsx

run this: npm config get prefix that will give you a clue as to where your global npm modules are installed. you need to add the bin directory under the directory returned by the above to your path. for example, it might return /usr/local, in which case you should add...

-bash: grunt: command not found

node.js,osx,bash,gruntjs,npm

Find where alias to grunt executable is located and check whether path to the file exist in PATH environment variable. If it doesn't exist, add path inside PATH. Normally, grunt executable is added inside, /usr/local/bin folder. But for my installation, it was placed inside /Users/<Username>/.node/bin folder. So I needed to...

npm install error not installing BrowserSync package

node.js,cmd,npm,command-prompt,browser-sync

Have you tried like below? (http://www.browsersync.io/#install) npm install -g browser-sync -g means global. ...

npm install: 'bower install' exited with error code 1

node.js,powershell,npm,bower

I could solve it. And can now run the app now localy. I did this steps to solve the issue: Deleting justgage in bower.json file. Using commandline: bower install justgage-official Using commandline: bower update The only problem is actually I can't start with foreman start (but it's another issue), instead...

error Failed at the [email protected] install script 'node-gyp rebuild'

node.js,npm,bcrypt,node-gyp

It was a security firewall that was blocking download links.

Nodejs : peerDependencies error while installing depedencNodejs

node.js,npm,karma-runner,karma-jasmine

You need to update the package.json file with the appropriate versions of the npm packages. Uninstall first by running sudo npm uninstall and then update the package.json. Run npm list to check the versions of the packages installed for your project. Try uninstalling the unmatched version package by providing the...

MeteorHacks:npm not working ( npm modules in Meteor)

node.js,meteor,npm

There's nothing wrong here. This process takes alot of time for some packages. If there is an error it will give a bit more clarity after some time. Such problems can come from an internet connection issue, incorrect binaries for the platform you're on. But as it stands it's installing...

node-gyp rebuild fails when installing webpack and other packages on OSX

node.js,osx,npm,node-gyp

This is a known issue with gyp/node-gyp that affects all platforms. You might want to add your two cents to that issue.

Shell script wrappers for npm packages that are command line programs

node.js,npm

This happens when you configure the "bin" property in your package.json as js-beautify does here. Specifically, npm install uses the cmd-shim module to create them as shown here.

npm install, node-gyp build error on only one of two identical machines

node.js,ubuntu,jenkins,npm

After successfully running npm install and Karma through Jenkins on a VM, I came to the conclusion that something had to be seriously borked on the VPS that was giving me trouble. I reinstalled Ubuntu 14.04 and the rest on the VPS and now everything runs fine. I also noticed...

Cannot find a submodule imported inside a module installed from npm

node.js,npm,reactjs,browserify,html-datalist

I feel embarrassed now. The problem is I didn't realize the transformation step and the bundling step are already combined into a single command line. Hence, instead of browserify -t reactify main.jsx > main.js browserify main.js > bundle.js Do this browserify -t reactify main.jsx > bundle.js ...

npm start fails because of [email protected] ELIFECYCLE

node.js,osx,npm

Two things you can try here: Ensure that you are running the same version of Node as the other system where it was seen running perfectly. You can test this by entering the following on your terminal and the terminal it was working on: node -v. If they're different, look...

`npm uninstall` hangs (or very slow) without apparent activity

linux,node.js,npm,rmdir,openafs

I'd suggest finding the PID of your npm uninstall and attach to it with strace or ltrace: strace -c -p <PID> http://linux.die.net/man/1/strace -c Count time, calls, and errors for each system call and report a summary on program exit Also, you can filter what calls to trace (i.e. file, network,...

is request (HTTP Request client) synchronous?

node.js,npm

This is asynchronous. var request = require('request'); console.log('1'); request .get('http://google.com/img.png') .on('response', function(response) { //Happens at some time later. console.log('2'); console.log(response.statusCode) // 200 console.log(response.headers['content-type']) // 'image/png' }); console.log('3'); Output: 1 3 2 404 text/html; charset=UTF-8 ...

NPM repo missing file

ember.js,npm,ember-cli

I confirmed that your repo looks fine npm install ui-responsive-toolbelt does not download the index file So the problem is that npm publish is not working properly. There is a bug filled for that. https://github.com/npm/npm/issues/5082 What you can do is publish again your addon using a recent npm version...

npm installs packages and dependencies in the project root directory

node.js,npm

When you use npm install, it will get up until it finds a package.json or a node_modules folder and install your package there. So if your project structure is like this project_root/ modules/ mymodule/ node_modules And you run npm install in mymod directory, the module will be installed in project_root/node_modules...

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

node.js,npm,return-value

The mistake in the code is that the javascript function "callback_fn" is returning the object to the cpp addon. So, we need to store it in the cpp addon and return it a callback is to be implemented. ret_val = cb->Call(isolate->GetCurrentContext()->Global(), 1, argv); //where ret_val is defined as Local<value> ret_val;...

Error while updating to latest pm2

node.js,npm,pm2

Updating to Latest npm (2.11.1) solved this issue. Thanks.

npm bin property is not working as expected

node.js,npm,command-line-interface

I solved the problem by adding the following line to the top of the addHeaderCli.js: #! /usr/bin/env node Now I can cal it like: addheader 'test.txt' 'my header' ...

Grunt tasks stuck in endless loop

javascript,node.js,gruntjs,npm,grunt-contrib-concat

In the last 2 lines of your Gruntfile.js you have redeclared the concat and wiredep tasks and when grunt tries to run your code, It stuck in an endless loop because concat refers to an undefined concat task, So you should remove these lines: grunt.registerTask('concat', ['concat']); grunt.registerTask('wiredep', ['wiredep']); In general,...

lodash npm distribution in browser

npm,karma-runner,bower,lodash

I think you are looking for node_modules/lodash/index.js

Include libraries with Composer, NPM or Bower

php,npm,composer-php,gulp,bower

They all do pretty much the same, the difference is their default package list (NPM purely NodeJS, Composer mostly PHP, Bower purely js/css, etc.) and the language they're written in. However, they all have one limitation: They can install packages in just one location. This means that you can't install...

NPM Error Parsing Json, Unexpected Token

json,node.js,npm

This did it for me, although not sure why. npm config rm proxy npm config rm https-proxy http://jonathanblog2000.blogspot.ch/2013/11/set-and-reset-proxy-for-git-and-npm.html...

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

javascript,jquery,node.js,npm,browserify

I had the same issue. Find out I load bundle.js in head, when DOM is not ready. Try to wrap your code in $(function(){...//code here...}) or move bundle.js to the end of body.

Yeoman angular grunt-serve vs http-serve

angularjs,gruntjs,npm,yeoman,http-server

I discovered that I had to run grunt to build the project which fixes the references and places a distribution uglified version of the project in a dist folder. This ran just fine on my other server.

Error: EMFILE: too many open files

javascript,node.js,request,npm

Use graceful-fs module, which is a drop-in replacement for the fs module. It is a wrapper around the native fs module. Quoting the docs of graceful-fs module, Queues up open and readdir calls, and retries them once something closes if there is an EMFILE error from too many file descriptors....

Is updating npm after installing node recommended?

node.js,npm

The npm team recommends doing an npm install -g npm after installing Node. (In other words, they recommend updating to the latest stable npm.) See, for example, this npm blog post.

Use existing JS “package” with Node.JS?

javascript,node.js,npm

All Node.js modules must export its contents via module.exports. You lack the following in your file: module.exports.ping = ping; This works as well (exports is initially assigned to module.exports): exports.ping = ping; ...

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

node.js,npm,cordova-plugins,visual-studio-cordova,plugman

A significant changed that occurred with Cordova 5.0.0 is that plugins are now starting to move to npm. Unfortunately Cordova 4.3.1 and below do not support npm based plugins. As a result, what you may be running into is this situation where the plugin references something in npm. This article...

node user model is vomitting

node.js,express,npm

This answer was mostly resolved in the comments. Here was the final solution. First, the project directory was incorrect and the file being required was not where it was supposed to be. Fixing the require statement fixed this issue. Second, the server was not able to connect to the mongodb...

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

node.js,bash,npm,circleci

with bash you can do [ $(node -p "require('protractor/package.json').version") != "2.1.0" ] && npm install [email protected] ...

404 on api authenticate for node restful

node.js,express,npm

You need to actually use the apiRoutes like this .... .... app.use('/api', apiRoutes); // ======================= // start the server ====== // ======================= app.listen(port); console.log('Magic happens at http://localhost:' + port); ...

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

node.js,shell,command-line,npm,package.json

set NODE_PATH=./ ; && node server.js I just a forgot semicolon actually :) Command above works fine. Post could be deleted (at the discretion of the moderator - but maybe it helps to someone). This question helps Setting an environment variable before a command in bash not working for...

error installing zmq (ZeroMQ)

node.js,npm,message-queue,zeromq,pyzmq

You're in a bit of a node/zmq ghetto on Windows, not nearly as much activity as on Linux, however I did find this under the issues on the github page for the ZMQ node binding: error trying to install ZeroMQ on Windows 7 by running “npm install zmq”. #415 The...

Why doesn't a command that works inside a docker container work from outside via docker run?

linux,npm,docker,circleci,linux-containers

Probably because the container's entrypoint is designed to give you a shell, but not take arguments. You can use docker inspect to view the entrypoint of the image. $ docker build - FROM busybox ENTRYPOINT ["/bin/sh"] Sending build context to Docker daemon 2.048 kB Sending build context to Docker daemon...

Can “.htaccess” file work with npm's “http-server” command?

.htaccess,npm,httpserver

.htaccess is an Apache configuration file. Since Apache isn't npm, Apache configuration files will obviously not work for npm. Npm uses environment variables and npmrc files to configure things. See this documentation page. In your case it looks like that this might do what you want it to do....

NPM Error: self signed certificate in certificate chain

ssl,npm,tsd

One little FYI first : if you just want to learn AngularJS, maybe it's not the best way to start with TypeScript. If it's the case for you, try the tutorial on angularjs.org, which use JavaScript and angular-seed. Anyway, if you want to use tsd, you have to edit your...

Error running jest react test, jest not recognized

npm,reactjs,jestjs

Looking closer at the errors, I had this: error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, p lease install Visual Studio 2010 build tools. I fixed this with adding the version of the build tools...

Meteor, NPM Modules, and Fiber Callback

javascript,node.js,mongodb,meteor,npm

Use this package instead : https://atmospherejs.com/froatsnook/request It provides a synchronous version of the npm request package, so you won't have to deal with Fibers issues. try{ var response = request.getSync({ url: "http://www.goodreads.com/author/quotes/1406384.John_Green" }); if(response.statusCode == 200){ console.log(response.body); } } catch(exception){ console.log(exception); } ...

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

javascript,angularjs,node.js,npm

First install node then install yeoman with npm install -g yo then install the desired yeoman generators for basic web app npm install -g generator-webapp for angular npm install -g generator-angular then run the installer generator. exemple with webapp : yo webapp or with angular : yo angular I...

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

javascript,json,node.js,npm

As we can see, there paсkage.json no in the project folder. Create it by running the command npm init in project folder or create your own with a text editor.

Sailsjs with angularjs npm install error

angularjs,gruntjs,npm,sails.js

Seems that your grunt-ng-annotate reaquires grunt at least 0.4.5 you have 0.4.2 try to manually change version in your package.json. It should work. Try this : "dependencies": { "ejs": "~0.8.4", "fs-extra": "^0.12.0", "grunt": "0.4.5", "grunt-contrib-clean": "~0.5.0", "grunt-contrib-coffee": "~0.10.1", "grunt-contrib-concat": "~0.3.0", "grunt-contrib-copy": "~0.5.0", "grunt-contrib-cssmin": "~0.9.0", "grunt-contrib-jst": "~0.6.0", "grunt-contrib-less": "0.11.1", "grunt-contrib-requirejs": "^0.4.4",...

How to find the version of module in Node Js

node.js,npm

You can install your module like this npm install your_module --save and this will install the module and save it in your package.json at the same time...

Microsoft Azure - Gulp 3.8.10 does not work on fresh Web App instance

azure,npm,gulp,kudu

The short version: You can install your own version of gulp where ever you have access, say D:\home\npm_tools\ for example, then override the default gulp path by setting an AppSetting GULP_PATH = D:\home\npm_tools\ The long version: 1) Go the DebugConsole above 2) npm config set prefix "D:\home\npm_tools" (or where ever...

NodeJs npm WARN uninstall not installed in $HOME/node_modules

linux,node.js,module,npm,uninstall

Try this: $ npm remove -g <module> Modules installed in /usr/lib/node_modules/ are global, meaning you must pass -g (--global) flag to npm in order to install/remove them. npm install <module> installs modules locally by default....

Node Global Install Error

javascript,node.js,npm

See - it looks like its not trying to interpret JS. Right, the "binary" should be a shell script. You can still write it in JS, you just have to tell the shell which interpreter to use. E.g. you can add #!/usr/bin/env node to the top of the file,...

Get an array of file names without extensions from a directory in Gulp?

npm,gulp

You can do it easily with glob, here is a code doing what you want. var glob = require('glob'); var path = require('path'); var modules = ['main-module']; var helpers = []; var dialogs = []; glob.sync("@(helpers|dialogs)/*.js") .forEach(function(file) { var module = path.basename(file, path.extname(file)) modules.push(module); switch(path.dirname(file)) { case 'helpers': helpers.push(module); break;...

What is the meaning of npm view dependencies output?

node.js,npm

You're seeing the output of util.format(), which is trying to create a valid Javascript literal. Since -s are not valid in identifiers, they must be quoted....

How to use curly brackets in npm scripts?

node.js,npm,mkdir

The {js,css} syntax is neither a feature of mkdir, nor is it a feature of the OS. It is a feature of your shell (probably bash). So in order to interpret it you need to execute a shell that can understand that syntax. The following will probably work but is...