无法解析 React Native 项目上的模块 redux [英] Unable to resolve module redux on React Native project

查看:34
本文介绍了无法解析 React Native 项目上的模块 redux的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从 react-native (0.26.0) 发布新版本以来,当我初始化一个新项目时,我收到了这个错误.当我 npm 安装其他模块(如 redux)时出现相同的错误,然后在运行时找不到这些依赖项.还有其他人遇到过这样的问题或有任何想法吗?

Since the new release of react-native (0.26.0) I'm getting this error when I init a new project. I get the same error when I npm install other modules like redux and then those dependencies aren't found at run time. Anyone else having an issue like this or have any ideas?

> utf-8-validate@1.2.1 install /Users/danseethaler/Developer/Test/node_modules/utf-8-validate
> node-gyp rebuild

2016-05-21 21:33:02.797 xcodebuild[6298:183020] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XcodeMultiEdit.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-05-21 21:33:02.935 xcodebuild[6298:183020] Build settings from command line:
2016-05-21 21:33:02.935 xcodebuild[6298:183020]     ENABLE_BITCODE = NO
2016-05-21 21:33:02.935 xcodebuild[6298:183020]     SWIFT_DISABLE_REQUIRED_ARCLITE = YES
2016-05-21 21:33:02.935 xcodebuild[6298:183020]     SWIFT_LINK_OBJC_RUNTIME = YES
2016-05-21 21:33:02.936 xcodebuild[6298:183020]     TOOLCHAINS = com.apple.dt.toolchain.XcodeDefault
2016-05-21 21:33:02.936 xcodebuild[6298:183020]     XCODE_DEFAULT_TOOLCHAIN_OVERRIDE = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/validation.node] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 15.4.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/danseethaler/Developer/Test/node_modules/utf-8-validate
gyp ERR! node -v v5.10.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
npm WARN install:utf-8-validate@1.2.1 utf-8-validate@1.2.1 install: `node-gyp rebuild`
npm WARN install:utf-8-validate@1.2.1 Exit status 1
Test@0.0.1 /Users/danseethaler/Developer/Test
└── react@15.0.2 

推荐答案

试试这个 .solve 我的,

try this .solve mine,

 npm i redux --save

这篇关于无法解析 React Native 项目上的模块 redux的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆