npm

angular web app - include library licenses

橙三吉。 提交于 2021-01-28 08:00:24
问题 I have an angular-cli with many libraries. To include the licenses for these I include all of the LICENSE and package.json files from node_modules in the build. "assets": [ { "glob": "**/package.json", "input": "../node_modules/", "output": "./licenses" }, { "glob": "**/LICENSE*", "input": "../node_modules/", "output": "./licenses" } ] However this adds ~4000 individual files to the output and adds time to the build and upload, and some of the libraries are build/development tools not used in

Unable to access npm

别等时光非礼了梦想. 提交于 2021-01-28 07:16:13
问题 I installed node (which internally installs npm ) offline following instructions from here Node is returned - $ node -v v10.22.0 But npm failed - $ npm --version internal/modules/cjs/loader.js:638 throw err; ^ Error: Cannot find module '../lib/utils/unsupported.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs

How to fix “no such file or directory, lstat 'scss/'”?

大兔子大兔子 提交于 2021-01-28 05:08:16
问题 i'm trying to follow a simple tutorial on youtupe https://www.youtube.com/watch?v=gYzHS-n2gqU&t=900s where he is tring to run an npm scripts "sass" file using the tirminal. -When i execut the command npm run sass shows me an error message Error: ENOENT: no such file or directory, lstat 'scss/' -I think the problem with the path of file or permissions on the file , where should configure in way to looks in the correct director. - here is folder structure -When i replace the script with :

How to fix 'npm ERR! Cannot read property 'startsWith' of null'

核能气质少年 提交于 2021-01-28 04:52:01
问题 I am creating my first react-native app. I am attempting to install the react-native command line interface as shown here. I keep getting an error when I type the command to initiate the react-native command line OS: Windows 10 Node: 10.15.3 npm: 6.4.1 I am not behind a proxy I have removed the http and https environment variables Updating node and npm creates a different error as shown here Here's the error C:\>npm install -g react-native-cli npm ERR! Cannot read property 'startsWith' of

npm run start with “DEBUG=*” issue on Windows

余生颓废 提交于 2021-01-28 03:51:38
问题 { "name": "apokidsi", "version": "0.717", "contributors": [ ], "dependencies": { "angular": "1.5.8", "angular-cookies": "1.5.8", "angular-messages": "1.5.8", "angular-ui-router": "1.0.0-beta.3", "debug": "^3.0.0", "flag-icon-css": "2.8.0", "jquery": "3.2.1", "moment": "2.18.1", "moment-timezone": "0.5.13", "node-fetch-npm": "^2.0.1" }, "scripts": { "clean": "gulp clean", "start": "DEBUG=true HOST=localhost:4200 gulp server", } } Here is the package.json file. When I run npm run start I get

Failed at the electron@1.8.2 postinstall script

喜你入骨 提交于 2021-01-28 03:01:51
问题 I was trying to install electron into my project, but it is giving an error. I also tried to do this with unsafe-perm, but still giving the same error. npm install electron --save-dev --save-exact > electron@1.8.2 postinstall E:\PrgLang\Electron\crypto-app\node_modules\electron > node install.js Downloading electron-v1.8.2-win32-x64.zip [============================================>] 100.0% of 55.21 MB (1.51 MB/s) E:\PrgLang\Electron\crypto-app\node_modules\electron\install.js:47 throw err ^

typescript type definitions for Open Layers 6

孤人 提交于 2021-01-28 02:32:09
问题 The @types/openlayers package (https://www.npmjs.com/package/@types/openlayers) only supplies type definitions for OpenLayers 4.6 . This is stated explicitly at the top comment in file index.d.ts . Are types for OpenLayers 6 available and, failing that, what should be the course of action for developing Typescript applications with OpenLayers 6 ? 回答1: Take a look at @types/ol: This package contains type definitions for ol (https://github.com/openlayers/openlayers). Version 6.4.2 回答2: If I

Setting up username and password for npm registry URL

落花浮王杯 提交于 2021-01-28 02:11:43
问题 I am trying to use npm to install a package from url : http://host:80 I did the following: npm config set strict-ssl false npm config set registry "<>" npm --proxy http://host:port install <> (our proxy does not require authentication) When I tired to run above install package command it throws npm ERR! code E401 npm ERR! 401 Authorization Required: @latest When I should I set the username and pwd for registry url.I googled and found that registry url and details are part of .npmrc file.

npm install (stop process gracefully on preinstall)

旧时模样 提交于 2021-01-27 23:31:38
问题 How can I make npm install stop (conditionally) within a preinstall script? Currently I have a preinstall script preinstall.js : if (someCondition) { process.kill(process.ppid, 'SIGKILL'); } package.json : { "scripts": { "preinstall": "node preinstall" } } However this will result in: npm ERR! code ELIFECYCLE npm ERR! errno 1 I would like to exit the process gracefully. Any ideas? 回答1: The best practice to preventing the installation of a node package it to return a non-zero exit code from