آموزش جاوااسکریپت › انجمن ها › react native › The development server returned response error code: 500
- این موضوع 3 پاسخ، 3 کاربر را دارد و آخرین بار در 4 سال، 5 ماه پیش بدست مهدی حسن زاده بهروزرسانی شده است.
-
نویسندهنوشتهها
-
حاجیانمیهمان
با سلام
من روی دستگاه واقعی برنامه رو میخوام اجرا کنم همه مواردی که در یکی از مقاله ها گفتید رو اجرا کردم
و بعد از دستور react-native run-android خطای زیر روی گوشی نمایش داده شد
که بعد از سرچ گفتند ورژن react رو به 0.55.4 تغییر باید بدم ولی باز هم همون خطا رو نمایش میده
ممنون میشم راهنمایی بفرمایید.The development server returned response error code: 500
URL: http://localhost:8081/index.delta?platform=android&dev=true&minify=false
Body:
{“type”:”TransformError”,”snippet”:”\u001b[0m \u001b[90m 18 | \u001b[39m\n \u001b[90m 19 | \u001b[39mtype \u001b[33mProps\u001b[39m \u001b[33m=\u001b[39m {}\u001b[33m;\u001b[39m\n\u001b[31m\u001b[1m>\u001b[22m\u001b[39m\u001b[90m 20 | \u001b[39m\u001b[36mexport\u001b[39m \u001b[36mdefault\u001b[39m \u001b[36mclass\u001b[39m \u001b[33mApp\u001b[39m \u001b[36mextends\u001b[39m \u001b[33mComponent\u001b[39m\u001b[33m<\u001b[39m{\u001b[33mProps\u001b[39m}\u001b[33m>\u001b[39m {\n \u001b[90m | \u001b[39m \u001b[31m\u001b[1m^\u001b[22m\u001b[39m\n \u001b[90m 21 | \u001b[39m render() {\n \u001b[90m 22 | \u001b[39m \u001b[36mreturn\u001b[39m (\n \u001b[90m 23 | \u001b[39m \u001b[33m<\u001b[39m\u001b[33mView\u001b[39m style\u001b[33m=\u001b[39m{styles\u001b[33m.\u001b[39mcontainer}\u001b[33m>\u001b[39m\u001b[0m”,”lineNumber”:20,”column”:49,”filename”:”G:\\project\\test\\App.js”,”errors”:[{“description”:”SyntaxError in G:\\project\\test\\App.js: G:/project/test/App.js: Unexpected token, expected : (20:49)”,”filename”:”G:\\project\\test\\App.js”,”lineNumber”:20}],”name”:”SyntaxError”,”message”:”SyntaxError in G:\\project\\test\\App.js: G:/project/test/App.js: Unexpected token, expected : (20:49)”,”stack”:”SyntaxError: G:/project/test/App.js: Unexpected token, expected : (20:49)\n\u001b[0m \u001b[90m 18 | \u001b[39m\n \u001b[90m 19 | \u001b[39mtype \u001b[33mProps\u001b[39m \u001b[33m=\u001b[39m {}\u001b[33m;\u001b[39m\n\u001b[31m\u001b[1m>\u001b[22m\u001b[39m\u001b[90m 20 | \u001b[39m\u001b[36mexport\u001b[39m \u001b[36mdefault\u001b[39m \u001b[36mclass\u001b[39m \u001b[33mApp\u001b[39m \u001b[36mextends\u001b[39m \u001b[33mComponent\u001b[39m\u001b[33m<\u001b[39m{\u001b[33mProps\u001b[39m}\u001b[33m>\u001b[39m {\n \u001b[90m | \u001b[39m \u001b[31m\u001b[1m^\u001b[22m\u001b[39m\n \u001b[90m 21 | \u001b[39m render() {\n \u001b[90m 22 | \u001b[39m \u001b[36mreturn\u001b[39m (\n \u001b[90m 23 | \u001b[39m \u001b[33m<\u001b[39m\u001b[33mView\u001b[39m style\u001b[33m=\u001b[39m{styles\u001b[33m.\u001b[39mcontainer}\u001b[33m>\u001b[39m\u001b[0m\n at Parser.pp$5.raise (G:\\project\\test\\node_modules\\babylon\\lib\\index.js:4454:13)\n at Parser.pp.unexpected (G:\\project\\test\\node_modules\\babylon\\lib\\index.js:1761:8)\n at Parser.pp.expect (G:\\project\\test\\node_modules\\babylon\\lib\\index.js:1749:33)\n at Parser.pp$8.flowParseTypeInitialiser (G:\\project\\test\\node_modules\\babylon\\lib\\index.js:4986:8)\n at Parser.pp$8.flowParseObjectType (G:\\project\\test\\node_modules\\babylon\\lib\\index.js:5492:29)\n at Parser.pp$8.flowParsePrimaryType (G:\\project\\test\\node_modules\\babylon\\lib\\index.js:5660:19)\n at Parser.pp$8.flowParsePostfixType (G:\\project\\test\\node_modules\\babylon\\lib\\index.js:5778:19)\n at Parser.pp$8.flowParsePrefixType (G:\\project\\test\\node_modules\\babylon\\lib\\index.js:5795:17)\n at Parser.pp$8.flowParseAnonFunctionWithoutParens (G:\\project\\test\\node_modules\\babylon\\lib\\index.js:5800:20)\n at Parser.pp$8.flowParseIntersectionType (G:\\project\\test\\node_modules\\babylon\\lib\\index.js:5815:19)”}
processBundleResult
BundleDownloader.java:266
access$200
BundleDownloader.java:35
onResponse
BundleDownloader.java:153
execute
RealCall.java:135
run
NamedRunnable.java:32
runWorker
ThreadPoolExecutor.java:1162
run
ThreadPoolExecutor.java:636
run
Thread.java:764مهدیمیهمانسلام
بعد از دستور react-native run-android اگر پکیجر node بسته است از دستور react-native start استفاده کنیدEhsanar44مشارکت کنندهداداش چجوری پروژه react native رو ساختی برا من ارور میده
مهدی حسن زادهمدیرکلاگر از نسخه 0.59.2 استفاده می کنید .یک باگ داخلی داره که به کمک مقاله زیر میتونید برطرفش کنید
https://reactapp.ir/solution-error-unable-to-resolve-module-index-from-node_modulesreact-nativescripts/ -
نویسندهنوشتهها