Newest npm Questions

Q&A for professional and enthusiast programmers

Having trouble using an external angular2 module via npm

I'm working from the Angular 2 quickstart and trying to add in a third-party component (ng2-split-pane in specific). I installed it with npm, and based on the plunkr example of it I have the ...

How to migrate NPM package to an organization @scope

NPM has recently introduced @scopes / organizations for the modules. Is there a good way to migrate existing modules to the organization? Are there any tools for automating it for a large number of ...

Cannot `gulp install`, results in `Cannot read property 'apply' of undefined`

I have installed NVM and NPM to an EC2 instance using this guide from AWS. I then install gulp and gulp-cli npm install --global gulp npm install --global gulp-cli Then navigate to my ...

Reading NodeJS process.argv in webpack compiled JavaScript

I'm trying to compile a simple TS file with webpack (via 'awesome-typescript-loader') that should read command line arguments. However, I believe the compiled JS is redefining the Node 'process' ...

My ionic Version 2 basic tabs project runs in the browser and terminal and gives error when lint finished in terminal

[enter image description here][1] [1]: In image as you can see that my build is working and project runs on browser as well as terminal but after few seconds build gives this error after lint is ...

Check if directory exists when copying with Gulp

I have a Gulp task for copying various libraries, how can I copy only if folder for each library doesn't already exists? Copying shouldn't overwrite anything because I am planning to customize SCSS ...

WebPack css-loader failure in Team City

I'm authorig a Team City build configuration for a web site (Done using VueJs). It uses yarn for building the web site and the problem is around web pack which it uses to bundle the final resources. ...

Webcap vendor specific configuration values

We have an application that we need to deploy to client sites. There are few variables that need to be set up at the client site. We can't find an optimal way to set these variables in all our ...

Is it possible to download and install JS-file (not NPM package) from NPM by URL?

Instead of adding <script src="https://checkout.stripe.com/checkout.js"></script> in the Index.html is it possible to add somehow URL for this JS-file in the package.json file (it is ...

Breakpoint within Vue instance method after npm build

I am new to Vue.js, and I am loving it. Previously I used JQuery and having to do everything manually was very inefficient. I liked, however, having the code I wrote in the Chrome debugger so that I ...

Node import looking for main file of npm module in wrong place

I have published an npm module: react-bootstrap-tooltip-button The package.json file states "main": "lib/TooltipButton.js", Installing the module as a dependency of another project using npm works ...

Variable 'module' must be of type 'any', but here has type 'NodeModule'

I'm working on an Angular project and recently installed ng2-dropdown-treeview 1.0.5. After installing, I restarted my server with npm start. My server log is printing the following error: [PATH]\...

Browserify cannot find required script

I am building a project with npm and Browserify, something I wrote using ReactJS. It is divided into a hierarchy of scripts, where the imported script that is executed first must import another script ...

How to remove cli configs from npm

When I run npm config list, I can see the following under ; cli configs: ; cli configs metrics-registry = "http://nexus.mydomain.net:8081/nexus/content/repositories/npm/" scope = "" user-agent = "npm/...

Cannot find module: Ember-template-compiler after upgrading to 2.12.1

After upgrading to Ember cli 2.12.1 I receive the following error, when trying to serve ember. Cannot find module 'C:\Users\assaue\web\client\bower_components\ember\ember-template-compiler' Error: ...

npm install issue with “@progress/kendo-angular-grid”

I have a project which uses kendo. Below is the package.json file: Package.json- { "name": "angular-2-webpack-starter", "version": "0.1.0", "description": "A starter kit for angular 2 and ...

Generate a local HTML file with PUG (npm / gulp)

How to create a HTML file with the same name as my pug file each time I save using gulp? All the docs on https://pugjs.org/ explain how to return pug in console...

Setting up remote URL mappings in package.json in order to have third-party libraries source code available whilst debugging

I currently have no support for debugging third-party libraries; that is to say I cannot debug the source code for the third-party libraries although I can debug my application's own source code. Can ...

Installing npm packages globally not working

I'm trying to install webpack globally, but instead, I get the following: Windows PowerShell Copyright (C) 2016 Microsoft Corporation. All rights reserved. PS C:\Users\Andrew> npm install webpack ...

Duplicate modules in bundle

I have a project that uses the 2.0.0-7 (beta) version of styled-components ("styled-components": "^2.0.0-7"), and also uses a module that references in its package.json the >=1.2.0 of styled-...

Is it compulsory to put package.json on root directory

Mistaken I started my whole project inside one folder that contains package.json. Now I'm going to distribute it using npm. While adding this dependency in some other project like: "abc-components": "...

How to invoke/use the ranker ID from within the nodeJs code to call Retrieve & Rank API?

I have tried a successful approach in Watson Retrieve and Rank, to set the 'ranker_id' from within the code snippet versus setting it as an environment variable. Below is the code snippet: ...

VSCode debugger messing up relative paths

So I'm trying to run the VSCode debugger run my express program, but I noticed that it's messing up the relative directory paths. When using a module like JIMP, a Node image manipulator, when I run ...

Webpack installation - es6

I am an es6 newbie! When all webpack installation were done, I started trying to create some files as in the pic and then i tried to write some code in index.js and checked whether it run or not ...

Whats the difference between axios and axios-es6 npm packages?

I'm new to npm and new to axios. I'm looking to use axios in my next Vue2 based project to try it out but I'm unclear which axios to install. axios: https://www.npmjs.com/package/axios axios-es6: ...

No gulpfile found error But i installed gulp clearly

I'm trying to install 'gulp' by using npm and then There is an error. C:\Users\SAMSUNG\myapp2>gulp [13:22:54] No gulpfile found I installed gulp clearly as this statement C:\Users\SAMSUNG\myapp2&...

gulp inject src and dest same file needs to be injected into back one directory wiredep is used

I cannot seem to get gulp-inject to inject data into an existing file when it lives up one directory at the root of my project I keep trying different things, I'm wondering if the . in my folder ...

How to install npm packages from Telerik private repository in VSTS build?

I have a nice application where I'm using Telerik's Kendo UI for Angular 2. It is getting better and better. I would like to setup my builds in VSTS where installing packages, compiling TypeScript ...

node-sass@4.5.1 postinstall: `node scripts/build.js`

I am trying to build angular-cli on jenkins and getting below error. I am using node (v6.10.0) and npm( v3.10.10). I don't have any direct dependency for node-sass in my package.json so it looks like ...

gulp src and destination is not injecting into my index.html file

So when I have a project that has the gulpfile in the same folder as my index.html but Now that I have a project in which I want the gulpfile.js inside a folder and the root of my project has the ...

Cannot use modules with Browserify

I am developing a project written in React, and I'm building it using npm and Browserify. I need to use a drag&drop plugin, but Browserify won't let me use it - I tried React-DnD and interact.js, ...

How can mocha recursively search my `src` folder for a specific filename pattern?

In my npm package, I would like to emulate the pattern Meteor follows: a source file (named client.js) has a test file (named client.tests.js) live in a src/ folder. Tests run with the npm test ...

What is the best way to display Flash messages in Express.js?

I have nodejs app in Ejs framework , I'am a newbie to java script, I need to know what is the correct way to set flash messages in Node.js My Code given below throws me an error ,like this : C:...

Specify Yarn dependency install path

I'm using Yarn to manage my dependencies for my project. I have developer dependencies (devDependencies) required for development and font-end dependencies (dependencies) that my project will require ...

how do I get around addLocal Could not install on Heroic

I have a Node project that I cam developing locally. I created a module that is in a folder at the same level as the package.json. I'm able to import it into my project with the following code "...

Express Busboy on File Event not firing

I am trying to make busboy work with my express code, but none of its events are firing, there are no silly mistakes like non-matching input field names etc. Here is app.js var express = require('...

Using npm as custom plugin manager?

Think of sublime text, where you can install or uninstall plugins. I want that for my app, and I want to use npm/github to do it. Maybe I'll require that your package starts with myapp- to be ...

'Cannot assign to read only property 'mappings'' after adding babel support to a react/webpack project

I created a very simple project by using a yeoman generator: npm install -g generator-react-webpack yo react-webpack I would like to enable babel so I can program in es6 npm install --save-dev ...

Remove/resolve Travis CI weird messages when deploying to npm

When package is being deployed to npm registry, some weird additional messages appear on Travis CI console: Standard messages: Deploying application NPM API key format changed recently. If your ...

node server crashing on uncaught exception

what is the best strategy to make node server not crash on uncaught exceptions? I have a web application in node. Whenever some uncaught error happens , server fails completely.we have to go to ...

gulp build error on gulp sass task

When running on gulp build, I have encountered the following error in the CLI events.js:141 throw er; // Unhandled 'error' event ^ Error: E:\Projects\gulp\css\styles.min.css:546:10: ...

Node global module getting current run directory

I'm trying to create a node module that has the ability to be installed globally using npm install -g mymodulename. I've got everything in the module working fine if I run node index.js in the ...

How to run jquery-chat on AWS

I'm first time to use AWS, and I'm trying to install the jquery-chat from https://github.com/lovelle/jquery-chat to test the demo live chat. However, I have tried both 'npm start' command and 'python ...

Publish npm package in angular cli

I've created a project using angular cli downloaded from here In my project, I created a module (ng-multi-selector). Here is my project structure: Here is my package.json : { "name": "ng2-multi-...

How to add viewmodel object into cookies using angularjs 2

Im trying to add viewmodel objects into cookie using angularjs2. I have tried a lot, but didn't worked yet. I private setCookie(name: string, value: any, expireDays: number, path: string = "") { ...

Importing modules in Angular 2 with Django

I have some trouble importing a module in an Angular 2 app served using Django. I've been working on combining Angular 2 and Django, loosely following this page: https://4sw.in/blog/2016/django-...

node js save and retrieve session data

I'm trying to save and retrieve session data using node js. This is the code that save the id of the user: var express = require("express"); var cookieParser = require('cookie-parser'); var ...

How to build(deployable)Webb App with npm and jenkins

So, I am creating an SPA with React, npm and webpack. I can create the build with the npm script I have on my local system. So it generates the /dist folder. Now what I want is do the same thing using ...

Why is the reference for a package to be installed from a pull request different for Yarn and original NPM client?

As discussed here the way we identify a PR from which to install a Node.js package is different when using Yarn client and different when using original NPM command line client, e.g.: npm install ...

npm: How to run several “watch” scripts in one command?

I have a command in npm's scripts: "start": "gulp sass && gulp & http-server", the gulp and the http-server are both 'holding and watching' command, so when i use npm start , it's will ...
Translating... 0%