You can use grunt concat concat: { dist: { src: [ 'startpage/file1.js', 'startpage/file2.js' ], dest: 'startpage.js' } }, ...
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....
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...
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" } ...
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...
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...
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...
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 }); }); ...
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...
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...
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,...
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...
javascript,github,deployment,npm
Look at the bower.json file, it has a main section!
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" ...
You have maybe a corrupted cache : npm cache clean
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');...
npm,ionic-framework,bower,ionic
the issue was with firewall, just need to do proxy and it will solve the issue
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....
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...
Found a workaround here module.exports = { resolve: { alias: { 'backbone': require.resolve('backbone') } } } ...
You can run individual script entries using npm run SCRIPTNAME: $ npm run postinstall ...
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...
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
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...
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...
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...
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:...
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`...
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....
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...
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,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...
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...
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 ...
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...
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...
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...
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....
Done! Just place this in head tag <!-- bower:css --> <!-- endbower --> <!-- bower:js --> <!-- endbower --> And run grunt bowerInstall again...
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:...
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.
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) {...
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...
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...
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. ...
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...
It was a security firewall that was blocking download links.
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...
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...
This is a known issue with gyp/node-gyp that affects all platforms. You might want to add your two cents to that issue.
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.
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...
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 ...
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...
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,...
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 ...
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...
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...
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;...
Updating to Latest npm (2.11.1) solved this issue. Thanks.
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' ...
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,...
I think you are looking for node_modules/lodash/index.js
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...
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...
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.
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.
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....
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.
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; ...
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...
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...
with bash you can do [ $(node -p "require('protractor/package.json').version") != "2.1.0" ] && npm install [email protected] ...
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); ...
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...
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...
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...
.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....
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...
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...
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); } ...
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...
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.
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",...
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...
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...
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....
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,...
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;...
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....
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...