ios - 无效的目录/用户/node_modules/superagent 与 React Native

标签 ios npm react-native

我在 React Native 项目中收到此错误 Invalid Directory/Users/node_modules/superagent。我不确定为什么它会在这个位置寻找模块?我该如何解决这个问题,以便在它实际所在的 React Native 项目的 node_modules 目录中搜索模块?

最佳答案

问题是 npm3。你必须将它降级到 npm2,因为扁平化的包似乎还不能与 react-native 一起工作。

关于ios - 无效的目录/用户/node_modules/superagent 与 React Native,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33840112/

相关文章:

objective-c - 初始化与数据 : expected struct NSData * warning

ios - 在iOS中通过电子邮件发送视频

node.js - Bower 安装 - 找不到模块 'q'

javascript - SyntaxError - node_modules/react-native/Libraries/polyfills/error-guard.js : Missing semicolon. (14:4) 在 react 原生库中运行 jest

ios - UIDatePicker 泄漏

iphone - 尝试根据单元格 subview 的文本量计算 UILabel 的帧大小

javascript - 在谷歌云功能中包含 npm 模块

node.js - NPM安装错误:Unexpected end of JSON input while parsing near '...nt-webpack-plugin" :"0'

react-native - 从 API 获取错误地在 Android 上返回旧的 "cached"数据,在 iOS 上返回最新数据

javascript - 替换 `' react '` with ` "react"` eslint(prettier/prettier)