admin管理员组文章数量:1388046
I am also facing a same issue while running the react-native app. The version i am using is as follows:
React-Native:0.57.1 react-native-cli:2.0.1 node:v8.11.3 npm:5.6.0
Babel Version details:
"devDependencies": { "@babel/runtime": "^7.0.0", "babel-jest": "20.0.3", "babel-preset-react-native": "^2.1.0", "jest": "20.0.4", "react-test-renderer": "16.0.0-alpha.12", "schedule": "^0.4.0" }, "jest": { "preset": "react-native" } }
Error:
error: bundling failed: TypeError: Cannot read property 'bindings' of null at Scope.moveBindingTo (/home/manish/Desktop/Practice/donut/node_modules/@babel/traverse/lib/scope/index.js:867:13) at BlockScoping.updateScopeInfo (/home/manish/Desktop/Practice/donut/node_modules/babel-plugin-transform-es2015-block-scoping/lib/index.js:364:17) at BlockScoping.run (/home/manish/Desktop/Practice/donut/node_modules/babel-plugin-transform-es2015-block-scoping/lib/index.js:330:12) at PluginPass.BlockStatementSwitchStatementProgram (/home/manish/Desktop/Practice/donut/node_modules/babel-plugin-transform-es2015-block-scoping/lib/index.js:70:24) at newFn (/home/manish/Desktop/Practice/donut/node_modules/@babel/traverse/lib/visitors.js:193:21) at NodePath._call (/home/manish/Desktop/Practice/donut/node_modules/@babel/traverse/lib/path/context.js:53:20) at NodePath.call (/home/manish/Desktop/Practice/donut/node_modules/@babel/traverse/lib/path/context.js:40:17) at NodePath.visit (/home/manish/Desktop/Practice/donut/node_modules/@babel/traverse/lib/path/context.js:88:12) at TraversalContext.visitQueue (/home/manish/Desktop/Practice/donut/node_modules/@babel/traverse/lib/context.js:118:16) BUNDLE [android, dev] ./index.android.js ░░░░░░░░░░░░░░░░ 0.0% (0/3)::ffff:127.0.0.1 - - [01/Oct/2018:05:31:17 +0000] "GET /index.android.delta?platform=android&dev=true&minify=false HTTP/1.1" 500 - "-" "okhttp/3.10.0" BUNDLE [android, dev] ./index.android.js ░░░░░░░░░░░░░░░░ 0.0% (0/3), failed.
It seems as if error is ing due to babel. But not able to get the solution. What is the solution for this issue ?
I am also facing a same issue while running the react-native app. The version i am using is as follows:
React-Native:0.57.1 react-native-cli:2.0.1 node:v8.11.3 npm:5.6.0
Babel Version details:
"devDependencies": { "@babel/runtime": "^7.0.0", "babel-jest": "20.0.3", "babel-preset-react-native": "^2.1.0", "jest": "20.0.4", "react-test-renderer": "16.0.0-alpha.12", "schedule": "^0.4.0" }, "jest": { "preset": "react-native" } }
Error:
error: bundling failed: TypeError: Cannot read property 'bindings' of null at Scope.moveBindingTo (/home/manish/Desktop/Practice/donut/node_modules/@babel/traverse/lib/scope/index.js:867:13) at BlockScoping.updateScopeInfo (/home/manish/Desktop/Practice/donut/node_modules/babel-plugin-transform-es2015-block-scoping/lib/index.js:364:17) at BlockScoping.run (/home/manish/Desktop/Practice/donut/node_modules/babel-plugin-transform-es2015-block-scoping/lib/index.js:330:12) at PluginPass.BlockStatementSwitchStatementProgram (/home/manish/Desktop/Practice/donut/node_modules/babel-plugin-transform-es2015-block-scoping/lib/index.js:70:24) at newFn (/home/manish/Desktop/Practice/donut/node_modules/@babel/traverse/lib/visitors.js:193:21) at NodePath._call (/home/manish/Desktop/Practice/donut/node_modules/@babel/traverse/lib/path/context.js:53:20) at NodePath.call (/home/manish/Desktop/Practice/donut/node_modules/@babel/traverse/lib/path/context.js:40:17) at NodePath.visit (/home/manish/Desktop/Practice/donut/node_modules/@babel/traverse/lib/path/context.js:88:12) at TraversalContext.visitQueue (/home/manish/Desktop/Practice/donut/node_modules/@babel/traverse/lib/context.js:118:16) BUNDLE [android, dev] ./index.android.js ░░░░░░░░░░░░░░░░ 0.0% (0/3)::ffff:127.0.0.1 - - [01/Oct/2018:05:31:17 +0000] "GET /index.android.delta?platform=android&dev=true&minify=false HTTP/1.1" 500 - "-" "okhttp/3.10.0" BUNDLE [android, dev] ./index.android.js ░░░░░░░░░░░░░░░░ 0.0% (0/3), failed.
It seems as if error is ing due to babel. But not able to get the solution. What is the solution for this issue ?
Share Improve this question edited Oct 1, 2018 at 6:40 Ashutosh 5187 silver badges21 bronze badges asked Oct 1, 2018 at 6:08 ManishManish 3931 gold badge6 silver badges20 bronze badges 4- What have you tried so far? – Ashutosh Commented Oct 1, 2018 at 6:15
- I just cloned my project from repository and tried to run it but it showed error. After making some changes i am still getting this error. – Manish Commented Oct 1, 2018 at 6:22
- What is the version of Babel? Is that patible with typescript and reactnative version? – Ashutosh Commented Oct 1, 2018 at 6:24
- "devDependencies": { "@babel/runtime": "^7.0.0", "babel-jest": "20.0.3", "babel-preset-react-native": "^2.1.0", "jest": "20.0.4", "react-test-renderer": "16.0.0-alpha.12", "schedule": "^0.4.0" }, "jest": { "preset": "react-native" } } – Manish Commented Oct 1, 2018 at 6:27
1 Answer
Reset to default 6I was using babel-preset-react-native
in dependency which has been deprecated instead "metro-react-native-babel-preset": "^0.47.0" is now being used. So, I updated this in .babelrc
file and I added the below line:
{
"presets": ["module:metro-react-native-babel-preset"]
}
The above code resolved the issue.
本文标签: javascripterror bundling failed TypeError Cannot read property 39bindings39 of nullStack Overflow
版权声明:本文标题:javascript - error: bundling failed: TypeError: Cannot read property 'bindings' of null - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744525604a2610728.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论