Tag: npm

NPM package-lock.json导致npm install在Linux上失败

所以我刚更新了我的Mac上的NPM,并在一个项目上生成了一个locking文件。 “嘿 – 那太好了”我说,并且承诺。 然后,我的构build在Travis CI上失败,如下所示: Compiling Frontend Assets npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm ERR! Linux 4.4.0-83-generic npm ERR! argv "/home/travis/.nvm/versions/node/v7.4.0/bin/node" "/home/travis/.nvm/versions/node/v7.4.0/bin/npm" "install" npm ERR! node v7.4.0 npm ERR! npm v4.0.5 npm ERR! shasum check failed for […]

NPM:原生反应的同伴依赖

我试图在我的MacBook上创build我的第一个反应原生应用程序: $ npm install -g react-native-cli 在我的package.json中有 { "dependencies": { "react": "~15.4.0-rc.4", "react-native": "0.41.0", "react-native-image-carousel": "^0.3.2", "react-native-image-picker": "^0.25.7", "react-native-local-mongodb": "^1.8.2" } } 与npm install我得到的消息 npm WARN react-native-image-carousel@0.3.2 requires a peer of react-native@^0.40.0 but none was installed. npm WARN react-swipeable-views-native@0.10.5 requires a peer of react-native@^0.39.0 but none was installed. 我需要做什么?

Laravel Elastic Beanstalk,无法安装运行npm?

我有我的Elastic Beanstalk与Laravel 5.4这里是我的02-node.config: commands: 01-install-node: command: "curl –silent –location https://rpm.nodesource.com/setup_8.x | s$ command: "sudo yum -y install nodejs" 和03-deploy.config container_commands: 01-laravel-deploy: command: "php artisan migrate" command: "php artisan config:clear" command: "php artisan config:cache" command: "php artisan route:clear" command: "php artisan route:cache" command: "npm install" command: "npm run prod" 在部署期间,我得到: ERROR: [Instance: i-018d9dd563f6ba0e6] Command failed on […]

在OSXterminal中找不到NPM Global Package CLI

我在安装express和express-generator并尝试使用express cli生成内容时遇到了问题。 当我使用npm install -g express和npm install -g express-generator ,但是在重新启动terminal之后,一切顺利,但是我不能使用快速文档 经过一番调查,我发现express和express-generator安装到: /usr/local/lib/node_modules/node/lib/node_modules 然而,在我的机器上工作的唯一软件包(像Yeoman,Grunt,我经常使用没有问题的东西)在这里安装: /usr/local/lib/node_modules/ 那么这里的交易是什么? 为什么我的install -g软件包进入node/lib/node_modules ? 我试过在我的.bash_profile使用export PATH=/usr/local/lib/node_modules/node/lib/node_modules:$PATH ,但是这似乎并没有帮助我。

使用父ID将子JSON对象移动到它们自己的对象

我对JavaScript非常陌生,正在使用Node.JS访问API并将响应存储在SQL Server中。 我正在使用“请求”和“mssql”节点包。 我不重视这些,他们似乎是我所需要的,并有良好的文件和支持。 我的问题:我有以下格式的API的JSON响应: requests = [ { url: 'https://domain.zendesk.com/api/v2/requests/2.json', id: 2, status: 'closed', priority: 'normal', type: 'incident', subject: 'Test Ticket', description: 'Test ticket', organization_id: 10101010101, via: { channel: 'email', source: { from: { address: 'bill.bob@domain.com', name: 'Bill Bob' }, to: { name: 'Company Helpdesk', address: 'testzendesk@domain.com' }, rel: null }, }, custom_fields:[ { […]

只有当节点的版本足够大时,我如何才能要求包?

我知道可以为一个包指定一个最小版本的节点,以允许在没有警告的情况下安装它 。 还有一个问题[只安装你的软件包兼容的最新版本,没有更新。] 但是,在我的情况下,我试图使我的软件包与不能运行0.10.x以上版本节点的硬件兼容。 具体而言,这是使用ARMv5处理器的硬件,在V8的较新版本中支持这种处理器。 为此,我需要一些polyfills,例如os-homedir 。 我不希望实际上要求安装任何这样的软件包,如果不需要的话,因为它们被标记为不赞成使用,在上面的例子中,它的npmjs页面被标记为甚至没有被使用,虽然我目前能够npm install它。 我如何指定只有当系统上的nodejs版本是0.10.x或更高版本时才需要特定的模块?

npm安装失败,因为node-gyp失败。 怎么修?

我最近试图为我们的项目做一个干净的安装。 但是现在npm install在Ubuntu 17.04上失败了。 我已经改变了节点,npm,node-gyp和python的版本,我没有成功。 这是由于对node-gyp或其他东西的改变? 运行: node-gyp rebuild 给我: gyp info it worked if it ends with ok gyp info using node-gyp@3.6.2 gyp info using node@7.10.1 | linux | x64 gyp info spawn /usr/bin/python2 gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args […]

React-native:Undefined不是一个对象…当使用'react-native-tts'

我想使用文本来发言我的反应原生的应用程序,所以我导入了反原生tts import React from 'react'; import { StyleSheet, View, TouchableHighlight, Image } from 'react-native'; import Tts from 'react-native-tts'; export default class App extends React.Component { constructor(props) { super(props); this._pressConfig = this._pressConfig.bind(this); this._pressPlay = this._pressPlay.bind(this); } _pressConfig() { console.log("pressed"); } _pressPlay() { Tts.speak("Hello world"); } render() { return ( <View style={styles.container}> <View style={styles.navigation}> <TouchableHighlight onPress={this._pressConfig}> <Image […]

为什么eslint错误导致网站在vue.js-cli安装后不显示?

我在Windows机器上安装了node.js。 然后我安装了npm i -g vue-cli 。 npm run dev在http:// localhost:8080提出了vue.js-cli站点。 closures并在我的电脑上,当我键入npm run dev ,我得到这个错误: 但是当我安装vuejs-cli的时候,我明确的表示我不想在安装的时候使用eslint。 在我的设置中没有eslint错误: 在我的浏览器中,我看到这个: 否则,我没有改变这些文件,并且在我安装了一次之后它就工作了。 我怎样才能得到这些eslint错误不会发生,并显示的网站更正?

使用pm2来做纱线开始给出错误,而npm开始正常工作

我有一个NodeJs微服务。 纱线的启动通常很好。 当我尝试使用pm2来启动这个作为后台服务时,面对以下问题: /Users/sairamk/.pm2/logs/api-error-21.log last 15 lines: 21|api | /usr/local/Cellar/yarn/0.27.5_1/bin/yarn:2 21|api | PREFIX="/usr/local" exec "/usr/local/Cellar/yarn/0.27.5_1/libexec/bin/yarn.js" "$@" 21|api | ^^^^ 21|api | 21|api | SyntaxError: Unexpected identifier 21|api | at createScript (vm.js:74:10) 21|api | at Object.runInThisContext (vm.js:116:10) 21|api | at Module._compile (module.js:533:28) 21|api | at Object.Module._extensions..js (module.js:580:10) 21|api | at Module.load (module.js:503:32) 21|api | at tryModuleLoad […]