npm

Cordova-build error: Use of const in strict mode

耗尽温柔 提交于 2021-02-10 04:57:47
问题 I've created a new Cordova project in VS 2015. When I'm try to run the code I'm getting the following errors in my build output: 1>------ Build started: Project: TestProject, Configuration: Debug Android ------ 1> ------ Ensuring correct global installation of package from source package directory: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\APACHECORDOVATOOLS\packages\vs-tac 1> ------ Name from source package.json: vs-tac 1> ------ Version from source package

'rm' is not recognized as an internal or external command when trying publish a capacitor plugin

跟風遠走 提交于 2021-02-10 03:59:26
问题 I am trying to publish a capacitor plugin. According to the error it is not able to recognize rm . I am using Window's Powershell (VC Code) The following error is being generated in the powershell when npm publish in run PS C:\Users\xxxxx\Documents\demo-plugin> npm run build demo-plugin@0.0.1 build C:\Users\xxxxx\Documents\demo-plugin npm run clean && tsc demo-plugin@0.0.1 clean C:\Users\xxxxxx\Documents\demo-plugin rm -rf ./dist 'rm' is not recognized as an internal or external command,

Node-gyp and custom dependency / library / header install path

元气小坏坏 提交于 2021-02-09 12:25:27
问题 I have a build environment in which my libraries (and headers) are installed to a custom location. When installing a package from npm, modules that use node-gyp fail because they cannot find the libraries (or headers) I've installed. How can I make node-gyp aware of my custom install location (linux)? 回答1: If you set CXXFLAGS and LDFLAGS before npm install <pkg> in the same line, it seems to work: $ CXXFLAGS=-I/path/to/include LDFLAGS=-L/path/to/lib npm install <pkg> Alternatively you can

npm run start working whereas ng serve not working

假如想象 提交于 2021-02-09 11:49:05
问题 I try to run angular 2 app with ng serve in Linux machine. It is not working. But I tried npm run start command. It is working fine. I got the following message when I tried ng serve command. As a forewarning, we are moving the CLI npm package to "@angular/cli" with the next release, which will only support Node 6.9 and greater. This package will be officially deprecated shortly after. To disable this warning use "ng set --global warnings.packageDeprecation=false". You have to be inside an

Install type definitions automatically when I install an npm package

一笑奈何 提交于 2021-02-09 11:47:45
问题 Is there a way to configure npm in such a way so that whenever I install a package, it will: Check if it has type definitions inside it If it does not, try to install @types/PACKAGE with the --save-dev flag Ideally, I'd like this to happen automatically (as a plugin or something) without writing a shell script that will limit the API. For example, I might write a shell script such as: (note that this doesn't really answer all the requirements) #!/bin/bash npm install --save $1 && npm install

webpack4 学习 --- webpack和webpack-dev-server

烂漫一生 提交于 2021-02-09 09:03:01
  直入主题吧,建个文件夹webpack-tut并进入,打开cmd命令窗口,执行npm init -y 命令,创建package.json 文件,转化为了node 项目,这样好管理依赖和版本什么的。此时可以学习webpack了。首先要安装webpack,不过这里要注意,webpack4 把webpack 命令单独抽了出来,形成了一个单独的包webpack-cli ,我们安装webpack的同时要把它安装上 npm install webpack webpack-cli --save-dev   webpack命令,就是我们在命令窗口中写的命令,我们在cmd 命令窗口中,输入webpack, 就会把打包,webpack 就是一个命令。为什么要单独形成一个包呢?因为webpack-cli 还提供了两个其它的功能,init 和 migrate命令,使我们快速创建webpack 配置和提供升级迁移。不过这两个基本不用,了解一下就可以了。我们只要记住安装webpack的同时安装上webpack-cli就可以了。   webpack 是模块打包工具,那就建几个文件让它打包,在webpack-tut 文件夹中新建一个src 文件夹,存放我们的源文件,再在src 文件夹中新建index.js 文件和component.js 文件,component.js 文件 export default

“npx tsc --version” reports different TypeScript version inside virtual machine

ぃ、小莉子 提交于 2021-02-09 02:57:48
问题 I want to be able to run npx tsc on my project on both my host + guest operating systems. But the guest is using a different (older) version of tsc - and I'm not sure where it's coming from. My setup: Host OS: Windows 10 Guest OS: Debian 9 I'm using VirtualBox, and the guest is mounting the host's files using VirtualBox's "shared folders" feature - so it doesn't have a separate copy of the project files - my project is accessed through shared folders at all times. I do NOT have Typescript

“npx tsc --version” reports different TypeScript version inside virtual machine

…衆ロ難τιáo~ 提交于 2021-02-09 02:56:09
问题 I want to be able to run npx tsc on my project on both my host + guest operating systems. But the guest is using a different (older) version of tsc - and I'm not sure where it's coming from. My setup: Host OS: Windows 10 Guest OS: Debian 9 I'm using VirtualBox, and the guest is mounting the host's files using VirtualBox's "shared folders" feature - so it doesn't have a separate copy of the project files - my project is accessed through shared folders at all times. I do NOT have Typescript

Pass npm script command line arguments to a specific script inside it

不打扰是莪最后的温柔 提交于 2021-02-09 00:47:31
问题 I have a scenario where I have to run three npm script to achieve some result in my application. I combined them in one npm script. This is my package.json : "scripts": { "setup": "npm install && npm run some-script && npm install", "some-script": "gulp some-other-script" } what I would like to do is to pass arguments to setup script from command line which will be passed further to the some-script script. If I run npm run script -- --abc=123 the arguments are added at the end of the script

Install npm package with conda via environment.yml

﹥>﹥吖頭↗ 提交于 2021-02-08 23:43:53
问题 I am wondering if it's possible to install npm packages directly through conda's environment.yml file. I know one can install pypi packages with pip directly as follows: name: docs channels: - conda-forge dependencies: - python>=3.7 - nodejs=10.* - pip - pip: - Sphinx==1.6.5 I've tried adding npm as a dependency as it's installed via nodejs but that doesn't work, unfortunately. name: docs channels: - conda-forge dependencies: - python>=3.7 - nodejs=10.* - pip - pip: - Sphinx==1.6.5 - npm: -