结帐后,当我说react-native run-android im低于错误时。
Metro Bundler has encountered an internal error, please check your terminal error output for more details
Run Code Online (Sandbox Code Playgroud)
下面是我项目中的package.json。
{
"name": "NCAPRNRedux",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.2.0",
"react-native": "0.52.2",
"react-native-vector-icons": "^4.0.0",
"react-navigation": "^1.0.0-beta.29",
"react-redux": "^5.0.6",
"redux": "^3.7.2",
"redux-thunk": "^2.2.0"
},
"devDependencies": {
"babel-jest": "22.1.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-react-native": "^4.0.0",
"jest": "22.1.4",
"react-test-renderer": "16.2.0"
},
"jest": {
"preset": "react-native"
}
}
Run Code Online (Sandbox Code Playgroud)
有人遇到这个问题并解决了吗?
我是angular.js的新手.我试图通过输入以下代码行在Ubuntu 12.04中安装bower.节点已成功安装在本地计算机上.
sudo npm install -g bower
Run Code Online (Sandbox Code Playgroud)
低于错误
npm http GET https://registry.npmjs.org/bower
npm ERR! Error: failed to fetch from registry: bower
npm ERR! at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR! at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR! at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR! at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR! at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
npm ERR! at Request.emit (events.js:88:20)
npm ERR! at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! …Run Code Online (Sandbox Code Playgroud) 我有一些元素以及每个元素中的上一个和下一个链接.好像我点击下一步我想要只向下一个可见的div添加一个类,我想跳过隐藏的div,如果div被隐藏,则将class添加到隐藏元素后可见的下一个div.因为我写了这样的东西
$('.next').click(function(){
$('.slide').removeClass('highZindex');
$(this).closest('.slide').next('.slide:visible').addClass('highZindex')
})
Run Code Online (Sandbox Code Playgroud)
我只是想从所有这些元素中删除添加的类,只需要添加到下一个可见元素但是发生的事情是如果单击下一个链接并且如果下一个div被隐藏它会跳过所有元素并直接转到最后一个div和类也没有添加到任何元素.
$('.slide').first().addClass('highZindex');
$('.prev').click(function(){
$('.slide').removeClass('highZindex');
$(this).closest('.slide').prev('.slide:visible').addClass('highZindex')
})
$('.next').click(function(){
$('.slide').removeClass('highZindex');
$(this).closest('.slide').next('.slide:visible').addClass('highZindex')
})Run Code Online (Sandbox Code Playgroud)
.slide {border:1px solid; height:200px; width:200px;position:absolute;top:0px; left:0px; background-color:#fff; }
.highZindex {z-index:1000}Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<div class="slide">1 <a href="#" class="prev">prev</a> <a href="#" class="next">next</a></div>
<div class="slide">2 <a href="#" class="prev">prev</a> <a href="#" class="next">next</a></div>
<div class="slide">3 <a href="#" class="prev">prev</a> <a href="#" class="next">next</a></div>
<div class="slide" style="display:none;">4 <a href="#" class="prev">prev</a> <a href="#" class="next">.next</a></div>
<div class="slide">5 <a href="#" class="prev">prev</a> <a href="#" class="next">next</a></div>
<div class="slide">6 <a href="#" class="prev">prev</a> <a href="#" class="next">next</a></div>
<div class="slide">7 <a href="#" …Run Code Online (Sandbox Code Playgroud)我正在尝试在我的本地机器上设置 angular2,我安装了 node 和 npm,在我执行“npm start”安装 npm 后,我收到以下错误
root@sameer-Vostro-2520:/home/sameer/angular2/angular-2-beta-boilerplate# npm start
> angular2-boilerplate@1.0.0 start /home/sameer/angular2/angular-2-beta-boilerplate
> concurrent "npm run gulp" "npm run lite"
sh: 1: concurrent: not found
npm ERR! weird error 127
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! not ok code 0
Run Code Online (Sandbox Code Playgroud)
我们怎样才能解决这个问题?
安装并发但又是同样的错误
concurrently@2.2.0 /root/.node/lib/node_modules/concurrently
??? commander@2.6.0
??? bluebird@2.9.6
??? cross-spawn@0.2.9 (lru-cache@2.7.3)
??? moment@2.14.1
??? rx@2.3.24
??? lodash@4.13.1
??? chalk@0.5.1 …Run Code Online (Sandbox Code Playgroud) javascript ×4
angularjs ×2
node.js ×2
css ×1
frontend ×1
jquery ×1
npm ×1
npm-install ×1
react-native ×1
react-redux ×1
reactjs ×1
web ×1