npm

Firebase - Failing to install firebase using npm but yarn works

Deadly 提交于 2021-02-11 12:06:40
问题 λ npm -g install firebase npm ERR! Unexpected end of JSON input while parsing near '...9gwBD9c+ThTWWmNBXcfJZ' npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\2nchy\AppData\Roaming\npm-cache\_logs\2020-07-13T18_19_46_173Z-debug.log I increased timeout seconds in .npmrc to 12,000 and downgraded npm to 6.3.17 , cleared the cache as it was suggested and even installed it from an empty directory but still getting an almost same error UPDATE Uninstalled nodejs and

Firebase - Failing to install firebase using npm but yarn works

梦想与她 提交于 2021-02-11 12:04:41
问题 λ npm -g install firebase npm ERR! Unexpected end of JSON input while parsing near '...9gwBD9c+ThTWWmNBXcfJZ' npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\2nchy\AppData\Roaming\npm-cache\_logs\2020-07-13T18_19_46_173Z-debug.log I increased timeout seconds in .npmrc to 12,000 and downgraded npm to 6.3.17 , cleared the cache as it was suggested and even installed it from an empty directory but still getting an almost same error UPDATE Uninstalled nodejs and

Elasticsearch Logstash Kibana Filebeat 搭建

谁说胖子不能爱 提交于 2021-02-11 10:43:12
阅读文本大概需要3分钟。 ELK+Filebeat的流程应该是这样的:Filebeat->Logstash->(Elasticsearch<->Kibana)由我们自己的程序产生出日志,由Filebeat进行处理,将日志数据输出到Logstash中,Logstash再将数据输出到Elasticsearch中,Elasticsearch再与Kibana相结合展示给用户。 Elasticsearch: 能对大容量的数据进行接近实时的存储,搜索和分析操作。 Logstash: 数据收集引擎,它支持动态的的从各种数据源获取数据,并对数据进行过滤,分析,丰富,统一格式等操作,然后存储到用户指定的位置。 Kibana: 数据分析与可视化平台,对Elasticsearch存储的数据进行可视化分析,通过表格的形式展现出来。 Filebeat: 轻量级的开源日志文件数据搜集器。 通常在需要采集数据的客户端安装Filebeat,并指定目录与日志格式,Filebeat就能快速收集数据,并发送给logstash进行解析,或是直接发给Elasticsearch存储 0x01: ElasticSearch 搭建 首先 在local下面创建elk目录 然后下载elasticsearch,logstash,kibana cd usr / local mkdir elk wget https : /

npm start fails with unexpected token in file from local dependency

三世轮回 提交于 2021-02-11 08:58:23
问题 I made first-app with create-react-app where a component makes use of some material-ui components, and it is working fine when started with npm start . From this application I extracted that nice-component component in a new nice-component folder, with its package.json , the component is in a .js file that export default the component class - in Visual Studio Code I can succesfully navigate to its sources, so I would guess the setup / folder configuration is correct. In final-app application,

npm start error but node index.js works

北战南征 提交于 2021-02-11 08:32:30
问题 I started learning nodejs and followed this tutorial to create a simple web app. https://blog.risingstack.com/node-hero-tutorial-getting-started-with-node-js/ According to the tutorial I can run the web app using either 'npm start' or node index.js' . When I use node install.js it works and give the result. But when I use npm start this error occurs. npm ERR! Linux 4.4.0-38-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start" npm ERR! node v4.2.6 npm ERR! npm v3.5.2 npm ERR! file

Can't run npm install

一笑奈何 提交于 2021-02-11 08:05:00
问题 In here it says to run npm install , but I get this error when I run sudo npm install . sudo npm install npm WARN enoent ENOENT: no such file or directory, open '/var/www/html/mg/package.json' npm WARN mg No description npm WARN mg No repository field. npm WARN mg No README data npm WARN mg No license field. without sudo: npm install npm WARN enoent ENOENT: no such file or directory, open '/var/www/html/mg/package.json' npm WARN mg No description npm WARN mg No repository field. npm WARN mg

Can't run npm install

99封情书 提交于 2021-02-11 08:01:09
问题 In here it says to run npm install , but I get this error when I run sudo npm install . sudo npm install npm WARN enoent ENOENT: no such file or directory, open '/var/www/html/mg/package.json' npm WARN mg No description npm WARN mg No repository field. npm WARN mg No README data npm WARN mg No license field. without sudo: npm install npm WARN enoent ENOENT: no such file or directory, open '/var/www/html/mg/package.json' npm WARN mg No description npm WARN mg No repository field. npm WARN mg

Cygwin Path Error: Cannot find module 'C:\cygdrive\c\…'

帅比萌擦擦* 提交于 2021-02-11 06:54:37
问题 I am using Cygwin on Windows 7 and it was working as expected until I updated it a couple of days ago. Now when I try to run a makefile for my NodeJs app I get the errors about paths. In error stack I see all the paths have double reference to C drive: C:\cygdrive\c\... Update : Reproduced in Git bash, Windows command line and Cygwin shells. Any ideas how to fix this? 回答1: Make sure the C:\cygdrive\c path is a native, Windows-style symbolic link to just C:\ as that is the expected behavior of

vue.js和vue-router和vuex快速上手知识

萝らか妹 提交于 2021-02-11 02:36:05
vue.js和vue-router和vuex快速上手知识 一直以来,认为vue相比react而言,学习成本会更低,会更简单,但最近真正接触后,发现vue的各方面都有做一些客户化的优化,有一些亮点,但也有一些很不顺手的地方,没有react的灵活度,但却有ng的方便性。要说vue和react哪个更适合做移动端,其实没有绝对的答案,喜欢就好。我希望能通过这篇文章能让大家迅速上手vue的全家桶。 本文的例子源码托管在github上,地址是 https://github.com/tianxiangbing/vue-demo 首先,我们用vue-cli搭一个vue的开发环境,目前vue-cli3.0也出来了,但使用者不多,中文文档也较少,更多配置都是vue.config.js里,这里配置是返回一个module,也是修改webpack的配置项,但其实还是很麻烦,这个不在本文主题内,省过... 1. 服务的搭建 安装vue-cli,建议安装2.x的版本,本文使用的是vue-cli3.0 npm install -g vue-cli 创建一个vue的项目,项目名称叫vue-demo vue create vue-demo 然后进入项目目录下执行安装依赖包 npm i 然后启动服务,执行命令 npm run serve ,你应该可以看到如下的结果: 看到这里,就算成功了,在浏览器中打开 http:/

“npx create-react-app appname” not working

可紊 提交于 2021-02-10 23:59:26
问题 When I run npx create-react-app appname I get the following error message: You are running `create-react-app` 4.0.0, which is behind the latest release (4.0.1). We no longer support global installation of Create React App. Please remove any global installs with one of the following commands: - npm uninstall -g create-react-app - yarn global remove create-react-app The latest instructions for creating a new app can be found here: https://create-react-app.dev/docs/getting-started/ npm ERR! code