npm

npm bin command - not recognized as an internal or external command

旧巷老猫 提交于 2021-01-28 22:24:30
问题 i'm having problem with bin command. If I understand documentation correctly then after runing command from bin it should execute the file So in my case package.json looks like: "author": "Andurit", "license": "contact author", "bin": { "shared-lib": "./node_modules/shared-lib-cli/bin/index.js" }, So I would expect that shared-lib in command line will execute ./path/bin/index.js Instead of that, I'm getting a command line error : shared-lib is not recognized as an internal or external command

Error running ./node_modules/.bin/cucumber-js in GitLab CI

∥☆過路亽.° 提交于 2021-01-28 19:45:09
问题 I am setting up a CI build for my node project. Although my npm run test works as expected in my local environment, the gitlab ci is throwing an exception. The test command fails in: > nyc ./node_modules/.bin/cucumber-js ./test/BDD/**/*.feature -f node_modules/cucumber-pretty -f json:./test/report/cucumber_report.json --require-module ts-node/register --require ./test/**/*.ts Error: Parse error in 'test/BDD/step-definition.ts': (1:1): expected: #EOF, #Language, #TagLine, #FeatureLine,

How to run multiple js servers

拜拜、爱过 提交于 2021-01-28 11:03:28
问题 I'm developing a discord bot for discord at the moment, and to run the bot, I have a few different files. I've run into some problems along the way that all ended up having the same fix, or at least the only fix that I could come up with. That fix would be, instead of running them in my main file (index.js), I could just run 3 separate batch files using nodemon (https://www.npmjs.com/package/nodemon). I currently have 3 batch files to do so. Those batch files look like this: nodemon index.js

Why does an npm module I wrote install so many packages after creating project with create-react-app?

[亡魂溺海] 提交于 2021-01-28 10:47:55
问题 I wrote this npm module, react-heartbeat, using nwb. When I install this module in a new project, npm i react-heartbeat , just after running npm init it takes less than 2 seconds and only installs 1 package. When I install this module, again npm i react-heartbeat , after creating a project with create-react-app , it takes nearly 3 minutes, adds 420 packages, removes 218 packages and updates 1257 packages . What am I doing wrong? My npm module is very simple, just 1 React component. It has no

Why does an npm module I wrote install so many packages after creating project with create-react-app?

白昼怎懂夜的黑 提交于 2021-01-28 10:44:28
问题 I wrote this npm module, react-heartbeat, using nwb. When I install this module in a new project, npm i react-heartbeat , just after running npm init it takes less than 2 seconds and only installs 1 package. When I install this module, again npm i react-heartbeat , after creating a project with create-react-app , it takes nearly 3 minutes, adds 420 packages, removes 218 packages and updates 1257 packages . What am I doing wrong? My npm module is very simple, just 1 React component. It has no

Error running Vorto Dashboard for Bosch iot suite

◇◆丶佛笑我妖孽 提交于 2021-01-28 10:11:01
问题 I am trying to run Vorto dashboard on Raspberry Pi to visualize my Bosch IoT "things" data. In order to run the Vorto Dashboard, I installed npm and nodejs and created the config.json file. I am getting the below error whenever I try to run the dashboard using the command: sudo vorto-dashboard config.json , knowing that I already added the OAuth2 Client credentials. No credentials given, can not get things Could not get the token with given credentials. - StatusCodeError: 400 - {"error":

ValidationError: Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema

旧街凉风 提交于 2021-01-28 10:07:40
问题 I just updated some of my packages in my package.json due to vulnerabilities. All vulnerabilities were fixed but the following error appeared when I did npm run. Copy Plugin package got updated during my vulnerability fix. I tried copying package.json from older commits and reinstalling all packages, but then the vulnerability appears again. ValidationError: Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema. - options[0] misses

Can't create a new angular project

六眼飞鱼酱① 提交于 2021-01-28 10:02:21
问题 Tried creating a new angular Project using, ng new Project All the files are created, just the node modules folder isn't created and it ends with this message ⠧ Installing packages...npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated har-validator@5.1.5: this library is no longer supported

Can't create a new angular project

走远了吗. 提交于 2021-01-28 09:57:14
问题 Tried creating a new angular Project using, ng new Project All the files are created, just the node modules folder isn't created and it ends with this message ⠧ Installing packages...npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated har-validator@5.1.5: this library is no longer supported

利用mocha进行以太坊智能合约编译部署测试

纵饮孤独 提交于 2021-01-28 09:22:40
使用智能合约编程语言solidity编写的智能合约,除了可以直接通过以太坊的工具链truffle,ganache-cli进行测试之外,还可以结合mocha进行单元测试。 mocha单元测试本质上,还是需要对合约进行编译、部署,只不过可以通过代码的形式进行直观的操作,而不是通过truffle命令来进行编译、部署、测试。 首先,构建工程,我们可以根据构建node项目的方式构建: 添加依赖:package.json "dependencies": { "ganache-cli": "^6.12.2", "mocha": "^8.2.1", "solc": "^0.4.26", "web3": "^1.3.3" } 项目结构这里简单遵循以太坊项目的结构建立一个contracts文件夹,用来保存合约。然后在contracts目录下新建HelloWorld.sol pragma solidity ^0.4.23; contract HelloWorld{ string public name; constructor(string _name) public{ name = _name; } function getName() public view returns(string){ return name; } function changeName(string _name)