Questions tagged [npm]

npm is the official package manager for Node.js, the non-blocking, asynchronous I/O framework that uses Google's V8 JavaScript engine. It can be used to install and publish CommonJS modules, jQuery plugins, reusable javascript code (libraries) and JavaScript-based CLI programs.

0
votes
0answers
10 views

NPM Package how to export files to use in other project?

I'm trying to create a simple npm package so I can share some typescript models between projects. In my lib folder I have these files: lib/model1.ts export default class Model1 { name: string; }...
0
votes
0answers
15 views

Why is Kudu node version not updating after setting is applied?

I've been trying to deploy an Angular Application to Azure App Service, the deploy fails and it gives the following log: Command: "D:\home\site\deployments\tools\deploy.cmd" Handling ASP.NET Core Web ...
0
votes
0answers
36 views

Unable to run npm start in create-react-app

PROBLEM Need to run my react project I have install create-react-app and create a project, When I tried to run project using npm start its showing some error When I first tried in my home dir ...
0
votes
1answer
36 views

Exporting custom ES6 module and importing into another local project is always undefined or {}, in TypeScript

I'm working with TypeScript 3.4.5 and Webpack 4.32.2 on Windows 10 through WSL. I'm trying to create a local package of tools, which aggregates basic classes into an index file, where I export them. ...
0
votes
1answer
24 views

Unexpected end of JSON input while parsing near '…PTiAdsxAq1UwLf0RRhbe2'

Downloaded and installed Node.js (node-v10.15.3-x64) Executed (npm install -g @angular/cli@latest) - executed without error Executed (ng new my-first-app) - received below error 2220 verbose stack ...
0
votes
0answers
7 views

@ng-select/ng-select and ng2-search-filter modules are conflicted in angular 7

I am doing project in angular 7. When I am using ng2-search-filter module to search from table and it's working fine. But when i install @ng-select/ng-select module it's removed my search module. ...
-2
votes
0answers
33 views

node.js: gyp ERR! stack Error: EACCES: permission denied, mkdir

When configuring a node.js; gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/username/builds/tt1yVn_C/0/project-lab/backend/node_modules/msgpack/build' gyp ERR!...
1
vote
3answers
40 views

React native init is not working in new fresh project

I'm trying to create a fresh project with react-native 0.59.8 but is failing. I have tried different versions of react-native so I think the problem is in yarn, node or npm versions that i'm using. {...
0
votes
0answers
21 views

Express App runs on local but not remote server - 'MODULE_NOT_FOUND',

I have a simple express app https://github.com/stuartabrown/express-google-assistant/tree/feature/new-simple-react. It all runs fine locally. However when I pull my code down to my remote server (...
0
votes
0answers
7 views

Pulling a package-lock.json and package.json together

I've read https://medium.freecodecamp.org/the-definitive-node-js-handbook-6912378afc6e , https://medium.com/coinmonks/everything-you-wanted-to-know-about-package-lock-json-b81911aa8ab8 and many other ...
0
votes
0answers
15 views

Build Fails With Spread Operator on Travis CI Only

my build, npm run build, for my website works locally, but on Travis CI it fails with the following error: > node scripts/build.js /home/travis/build/PatrickDuncan/patrickduncan.github.io/...
0
votes
1answer
18 views

How do you get express to work on Heroku app?

I have a app on Heroku and when I run node server.js it's throwing a error and saying Error: Cannot find module 'express'. I've cleared the npm cache, rebuilt the app, checked the package.json & ...
0
votes
2answers
19 views

ReferenceError: Invalid left-hand side in assignment when importing @google-cloud/storage

I am getting error when I import @google-cloud/storage in nodejs, const gcs = require('@google-cloud/storage'); When I comment the line, everything works fine. Below is the error I get: /home/...
0
votes
1answer
14 views

Nuxt run dev fatal error with status code 500

I was working on a Nuxt.js project and everything was working perfectly, then suddenly the npm run dev failed. I tried to run it again and I am constantly getting this error: FATAL Request failed ...
-3
votes
0answers
12 views

How to deploy Next js build on apache

I am new in next.js and try to deploy build on local host according to official link is here we need a port for run build. Now question is how can i run this app on apache without port
-2
votes
1answer
20 views

I tried to install npm and ng and none of the commands work. I need to remove everything and start over

I am new to angular and terminal use. I installed npm and was trying to use ng serve and that is where the problems began. I am ready to completely uninstall everything and start over. I have ...
1
vote
0answers
19 views

yarn 'There appears to be trouble with your network connection. Retrying…'

I'm working behind my institute proxy and can't use yarn, its showing yarn install v1.16.0 info No lockfile found. [1/4] Resolving packages... info There appears to be trouble with your network ...
0
votes
0answers
5 views

Is there a way to include files from an e.g. package.json parent directory?

I want to be able to install local modules (below called myLibModule1/ and myLibModule2/), which need to access certain dll files in the lib/ directory. I tried to use the files attribute on the ...
0
votes
0answers
11 views

How to fix “ EventSource's response has a MIME type (”text/html“) that is not ”text/event-stream“ ” error in Express?

I'm setting up a web interface and I want the server to send data dynamically to update graphs. I found SSE (Server Sent Event), but I don't know how to use it. I try and retry but each time I got ...
0
votes
1answer
12 views

How to fix the error when installing vue-cli

when I run the command npm install -g vue-cli I get the following warning, apparently I have no errors but when executing vue init webpack my-project or vue --version this pops up
1
vote
1answer
34 views

Is there a way to use a global variable for the whole npm project?

I need to use a variable between node modules folder and src folder.Is there a way to use a variable to be used within the whole project? Thanks.
1
vote
1answer
53 views

What does “npm install” when “node_modules” exits?

What's the effect of "npm install" when you have a "package.json" and a "node_modules"-directory as well in your project-directory? Does it overwrite the existing modules? Does it update them or does ...
0
votes
0answers
8 views

Jenkins suddenly showing “wrapper script does not seem to be touching the log file” and times out with a FAILURE message

I've been using Jenkins for years in a LEMP stack environment. Once I upgraded it to 2.164.3 with all the plugins installed, most of the non-heavy commands are running just fine, however, commands ...
-1
votes
1answer
25 views

Trouble in installing loopback on windows

After running the command : npm install -g loopback-cli I am getting this output: C:\>npm install -g loopback-cli npm WARN deprecated swagger-ui@2.2.10: No longer maintained, please upgrade ...
0
votes
0answers
16 views

npm install error on Ubuntu: Refusing to install rxjs as a dependency of itself

I use Ubuntu and try to install rxjs. When I trying to install it via npm i rxjs I got error: Linux 4.18.0-20-generic npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i" "rxjs" npm ERR! node v8.10.0 ...
0
votes
0answers
3 views

How to use separate git branch as npm package dependency in different corresponding local branch package.json?

I want to install a common-utility git repo as a dependency in my different services. For different branch on each service i want to include corresponding branch of common-utility as a dependency in ...
0
votes
0answers
27 views

Best way to fix versions for npm packages in an existing package.json

I have a company project which have the npm packages installed with version having ~ and ^. No new development happened in the project for few months. Now, new development is happening and due to npm ...
0
votes
1answer
24 views

Docker Angular run-scripts issue

My Dockerfile for Angular App FROM node:10.15.3-alpine as builder RUN mkdir -p /usr/src/app WORKDIR /usr/src/app RUN apk add git COPY package*.json /usr/src/app/ RUN npm i COPY . /usr/src/app RUN ...
0
votes
0answers
16 views

npm run build throws error code ELIFECYCLE when copy source to new directory

I'm trying to build a project with npm (I'm not sure if it's NodeJS or ReactJS or anything else. I just want to deploy it). I run 2 following commands: npm install npm run build Everything works ...
0
votes
0answers
25 views

Error on npm start in npx create-react-app in windows

I am new to react and when i create a react app via command npx create-react-app my-app The app created successfully but when i go to the directory and type command npm start it gives me an error....
0
votes
0answers
17 views

Vue module load not able to complete

Vue project stuck at module load, not completing fully, I ran npm run serve, I have installed al the dependencies still it is not loading. check the below image. I also tried by uninstalling and ...
0
votes
0answers
15 views

Running tests with 'ng e2e' is throwing 'Invalid host header'

I am executing protractor tests by executing ng e2e command, after running server on Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ Then ...
0
votes
2answers
29 views

How to convert postgreSQL to Sequelize format

I have to try to convert my postgre sql query to orm concept using sequelize npm package, kindly guide me. select * from "locationDepartmentMappings" as a inner join "departments" as b on a."...
0
votes
2answers
38 views

Angular Image For Docker quitting With Error

Node Version that my docker image has = v12.3.0 NPM version = 6.9.0 below is the package.json file, which lists all the dependencies for the app. { .. }, "private": true, "dependencies": { ...
0
votes
1answer
18 views

Error : npm install ERROR “No Valid versions available for dateFormat”?

I use google cloud engine VM instances is CentOS7. I clone the Node project from git and try to run but Error : Cannot find module 'dateFormat' then I have tried to install dateFormat on CentOS7 ...
0
votes
1answer
38 views

Where does “npm install -g <package>” install the package?

I have installed some packages using npm install -g and was wondering were they were actually installed? If I use npm install they are installed in the current directory under node_modules it appears....
0
votes
0answers
7 views

deserializeUser is called but req.user empty

I've set up my serialize and deserializeUser functions for the strategies I'm using, the serialize function is sending over the ID of the user registered in the database, and then the deserializeUser ...
0
votes
0answers
27 views

Run npm start command inside docker in background

I have a docker container containing React app created by create-react-app. On the start of container I want to run npm start command and get back to my host terminal. Right now it is still showing ...
0
votes
0answers
7 views

NPM Tokens: Apply only to Specific Packages?

I have an NPM Account. This account owns a number of individual packages. It's also listed as a maintainer on a number of accounts. I want to create an authentication token that will let me ...
0
votes
0answers
11 views

How to add authentication header to NPM Put

I've been using Verdaccio for our internal NPM and need to restrict publishing by token. We want to restrict publishing to our Jenkin builds so I was hoping that a token can be "configured" on the ...
0
votes
2answers
15 views

is there a way to reduce the commands to execute a node application installed from npm

I made a small npm package and deployed it, basically it's a CLI tool built in node, and I am trying to reduce the commands needed to execute it So far, to use the CLI, I follow this steps : -> npm ...
0
votes
0answers
21 views

npm crashes at every single command

When I try to start my program, the npm throws the following error (look below), none of the npm commands can solve the problem. Even if I type $ npm -v only this message shows up. I have macOs mojave,...
0
votes
1answer
17 views

NPM ERR! Test failed - Not able to run test

Running a few tests for react js using Jest and Enzyme but one of the files keep breaking. Using Jest and Enzyme I already cleared the cache , but i keep getting the following : NPM ERR ! Test ...
0
votes
0answers
14 views

GoCD - Angular Build not able execute

I am working on GoCD interface for Angular deployment configuration. I did configure npm install but after i am trying to execute the build command as below, but it is throwing error like Please ...
0
votes
1answer
28 views

AngularJS app server won't start with npm start

I was working on the AngularJS angular-phonecat tutorial on my MacBook, yesterday. It worked fine. (although npm start and npm test both required sudo to actually work, which is strange) Today, I ...
-4
votes
1answer
33 views

How to test an HTML page with jQuery DOM manipulations

I was asked to develop an HTML page with jQuery DOM manipulations - e.g., when I click the submit button, a success/error message is displayed - and to test them. I'm used to do such a things with ...
1
vote
1answer
32 views

The “path” argument must be of type string. Received type object - Angular 7

I try to run test on my angular project typing ng test --browsers=PhantomJS Before, I must install phantomjs manually using command npm install phantomjs-prebuilt@2.1.16 -ignore-scripts But after ...
0
votes
1answer
34 views

Lodash.uniqueId always returns 1

Try to use lodash (version 4.17.11) _.uniqueId() always returns 1 instead of random 3-digits number. Also _.uniqueId('prefix') always returns prefix1. Is it a problem?
0
votes
0answers
15 views

Getting different test results running mocha directly in git bash vs running it as an npm script

I have a Node.js unit test that utilizes newman library to run a postman collection test. When I run mocha test/test_file.js directly in git bash I get all the console statements and newman results ...
0
votes
2answers
23 views

Auth0 upgrade to Node8

My applications are on Node-v4 and use Auth0 for authorisation. End of May, Auth0 is being upgraded to Node-v8 stopping support for Node-v4. Should I also be updating my applications to a higher level ...

http://mssss.yulina-kosm.ru