Newest npm Questions

Q&A for professional and enthusiast programmers

npm package from inside another repo?

Related: Depend on a branch or tag using a git URL in a package.json? The electrode-archetype-react-app npm package comes from a subdirectory of another package's git repository: electrode-io/...

How do I pull an npm package from node_modules into my Angular2 app?

I've included https://www.npmjs.com/package/google-libphonenumber in my package.json, so it's being installed into the site's node_modules directory. How do I get the functionality from this js file ...

Node.js app building error “UNMET DEPENDENCY phantomjs-prebuilt@^2.1.4” on Heroku platform

Project is cloned from existing repository and not yet modified: https://github.com/ebdrup/html2pdf.it I am looking for piece of information that would help me get through this simple looking yet ...

MySQL bundled within an NPM app

The idea is to bundle the MySQL database within the npm app. The reason behind this is because the app is intended to run as a stand-alone desktop application built using Electron and, of course, many ...

Difference in developing my application Angular 2 in windows 10 and run it in linux

I developed my Angular 2 application on the windows 10 operating system, I run it in development and production mode locally and it runs correctly. When running on a linux server with centux ...

unable to install bower in windows 10 using npm

I am unable to install bower in windows 10 using npm. The Error message I get is: C:\WINDOWS\system32>npm install -g bower npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\\Program Files\\nodejs\...

where should a module write files?

I wrote a CLI module, wikidata-cli, that for a certain command (wd props) caches results as files in the module directory: node_modules/wikidata-cli/props/some-file. It works in my local setup where ...

How get filelist in “npm run <script>” and pipe it to another script?

In my package.json, I'm running a node module that can only handle one file at a time (I didn't write it). For example: cleancss somefile.css -o somefile-min.css I want to be able to do something ...
+100

How to bundle an angular 2 application for production in my case?

I read this post - http://blog.mgechev.com/2016/06/26/tree-shaking-angular2-production-build-rollup-javascript/ and I want to include the first step Simple build with minification. into my application....

NPM causes segmentation faults

Whenever I run npm on the command line, whether it's npm install or npm run build or just npm by itself I get segmentation faults. I am running windows 8.1 I tried uninstalling and reinstalling node....

React Native dependency error

I'm brand new to React Native, I wanted to install an UI toolkit to simplify my UI design process so I went ahead and installed @shoutem/ui. After the installation I ran my application and I got a ...

mac sudo npm install -g protractor Error 404

When I run sudo npm install -g protractor, got the error, looks like there's no that folder/files. Is there anyone who knows how to solve the problem? Thanks very much :) npm ERR! Darwin 15.6.0 npm ...

Redis client returns null for every command

I am trying to retrieve values of keys using npm package 'redis'. But I am obtaining the result as 'null' for any command I use. I checked the database but the values exists over there. Following is ...

How do I install AngularJS 2 using NPM?

I'm trying to setup my own local development environment for an Angular 2 app without using the QuickStart seed mentioned in the Angular 2 site or the Angular CLI because they tend to come with extra ...

npm peerDependencies React : can't install any packages

I'm building new React App to learn and play with Draft-js, RichStyle Text Editor. I used create-react-app to initialize my React application. It's working, and very easy to use. Now, I tried to add ...

Electron: electron-edge and user32.dll

Regarding some NPM package that allow me to hide specific windows (Windows only, not mac or linux), in this question @shawn-rakowski offer a solution using user32.dll and node-ffi. Hiding other ...

How to properly import npm packages in react

So I'm using a few plugins that I've used before and have worked in projects without react. The plugins I'm using are: -Bootstrap -Bootstrap-select -DataTables I'm trying to use the by using the ...

Rename file using custom npm script

I want to make a script for my angular2 project that renames README.md to README_2.md. I installed "renamer" : "0.6.1" and made this script: "renameMd": "renamer --find js/README.md --replace js/...

Installing npm globally

Is it possible to install npm globally and is this a good idea? I installed npm with the npm install command and was able to run npm start. Then after publishing my project to github I wanted to make ...

npm install is really slow every time

when running npm install --no-optional, it takes around 3 mins every time to complete. It installs ~ 200MB of files. I would like to speed the build process, but I cannot find any ways to really speed ...

I am not getting npm version properly, installed through Node in Windows 8

I have installed the latest version of node in windows 8. When trying to get node version by node -v its working fine, but when trying to get the npm version by npm -v, I am facing issue (highlighted ...

How can I have “unmet dependecy” to the package itself?

I'm running the following. PS npm install rxjs --save The result confuses me beause it says as follows. burger-boner@1.0.0 C:\Source\Poc\BurgeBoner `-- UNMET PEER DEPENDENCY rxjs@5.0.3 How ...

How do you install angular-cli for windows 7

I am trying to install angular-cli for windows. I know the command is npm install -g angular-cli, however once I run this command I then try to do ng new however I get an error saying "ng is not a ...

npm start : Failed start script 'ng serve'

Just to clarify this: I'm completely new to AngularJS and to any Web Technology. I'm a beginner when it comes to Web Development. I tried to install it and I've gotta admit, after many "Unknown ...

Declaring a Phaser game collisionHandler callback with Node(?) syntax

I'm used to vanilla JavaScript syntax for building simple Phaser games, but I've been using this Yeoman generator, which changes the syntax to something new that I'm not familiar with. I'm honestly ...

Script for initial build of Angular 2 project?

How can I write a script for npm that installs the node_modules in an angular 2 project and compiles the ts files. This doesn't work: "scripts": { "firstBuild": "npm install && tsc", .... I ...

npm start “This app is running in prod mode”

I have pulled a react & redux project from github. Click here (https://github.com/bencripps/react-redux-grid-demo) to view the source code. I executed "npm i" and then after "npm start" the ...

LNK2001 error when installing node-java on Windows 10

I'm trying to install node-java https://github.com/joeferner/node-java on Windows 10. I'm having problems. I'm using 32 bit java 8 jdk but still getting a LNK2001 error. C:\Users\seven\workspace\...

Can't build Phonegap app with plugin from npm

Phonegap Build throws an error during build. I've just added this string to "config.xml". <plugin name="cordova-plugin-mauron85-background-geolocation" source="npm" spec="^2.2.0"/> This is my "...

Convert PHP CURL to NPM CURL

I am currently attempting to make a CURL request using node. I have the following CURL request in PHP:- $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://www.website.com'); curl_setopt($ch, ...

Is there a way to list what `npm publish` will actually publish?

The docs explain how to control which files are not sent to the npm registry when you run npm publish. If you use .npmignore, or you're not using git that set of files differs from the set that are ...

laravel echo as a single js for non nodejs user

as per https://laravel.com/docs/5.3/broadcasting laravel provides a wrapper for pusher they do it by there laravel-echo java script file code is: import Echo from "laravel-echo" window.Echo = new ...

/#/ is getting converted to /#!#%2F

I had a project that I developed using angularjs. I was using npm for package management. I was able to access my web application in browser with below url http://localhost:8080/myprojectname/#/home ...

ReferenceError: process is not defined when requiring Shelljs in ReactJS

I am trying to require shelljs in my core React component. import React, { Component } from 'react'; import {render} from 'react-dom'; import Header from './components/Header'; const shell = require(...

How to initialize mysql database when user is installing software

First of all, I realize that I might not be thinking about this problem correctly, but here goes. So, I'm working on a Node project that will rely on a MySQL database. So, while I'm developing this ...

Webpack and ts-loader bundle returning TypeError on third party library

Everything compiles and bundles however there is a TypeError in the browser: "box2dweb_commonjs_1.default is undefined." No error on starting webpack-dev-server and checking the bundle at http://...

Don't understand yarn check warning

When I run yarn check I got this warning: warning "\u001b[2mchokidar#\u001b[22mfsevents#node-pre-gyp@^0.6.29" could be deduped from "0.6.32" to "node-pre-gyp@0.6.32" Would someone please help me ...

how to get length of couch.get(data,headers,status)

I tried to create nodejs with expressjs by connecting to couchdb . For that I have used nodejs-couch installed using npm. app.get('/', function(req, res) { couch .get(dbName, viewUrl) ....

Why does binary npm file have two checks

Every binary inside node_modules/.bin have the following code: #!/bin/sh basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") case `uname` in *CYGWIN*) basedir=`cygpath -w "$basedir"`;; esac # ...

webpack throw new TypeError('Path must be a string. Received ' +

I have a problem, when i use webpack from cmd (npm start). It throw a error.But yesterday do not like this.I never change my code... Every senior, please help me, thanks

Why is npm not installing react from package.json?

If I remove my node_modules and do a clean npm install in my ReactNative project, I get the warning "react-native@0.37.0 requires a peer of react@~15.3.1 but none was installed." However, I have react ...

in AWS beanstalk, i must execute nodejs's app with the command “npm run dev”. how can i resolve?

enter image description here Hey guys, I have some problem. I am using AWS beastalk. and i want to run nodejs's app with this command "npm run dev". I tried deploying by using web console zip file ...

Is it a good practice to automate the --fix flag?

Is it a good practice to automate ESLint with the --fix flag will that create problems in the long run ? for example using npm and in the "prestar" script i make ESLint lint and fix fixable errors in ...

npm install not creating node_modules inside dockerfile

I am using a dockerfile to define a custom Wordpress distribution that uses React in frontend (via special theme). To do that I am modifying the official Wordpress dockerfile and adding the theme, ...

How to run test in nightwatch?

I just installed git clone https://github.com/nightwatchjs/nightwatch.git and when I run : npm run unit-tests from the commandline in windows I get an error: > ./bin/nightwatch -c test/...

How to update npm packages really?

I've been learning nodejs, and something that's always been tripping me was how inconsistent npm was (at least on my system - Ubuntu 16.04 LTS). Currently, the issue I'm facing is updating my Mongodb ...

How to console.log in a file which is in a third party package in Meteor?

I am using a third party library react-photo-gallery, the width of the images is coming appearing different when I forked the repo and when I am using it in my app. I wanted to do some console.log in ...

Issues regarding npm start for react js

i created a reactjs component and trying to run the command npm start . Terminal simply terminating without showing any response.

How to enable intellisense for bootstrap installed as npm package?

I have an Angular 2 project based on webpack 2. Bootstrap is installed as npm package and imported in the app, but Visual Studio doesn't give me intellisense when I edit html files by default. I ...

Does not run command npm run build:prod Angular 2 project in production linux server

Execute the command npm run build:prod I do not know if the error is in the port, or in one of the files. npm ERR! Linux 2.6.32-642.6.2.el6.x86_64 npm ERR! argv "/root/.nvm/versions/node/v6.9.4/bin/...
Translating... 0%