0

Estou desenvolvendo uma app no react native. Contudo ao gerar o buildo recebo estar mensagem:

Loading dependency graph, done. error: bundling failed: ReferenceError: Unknown helper objectSpread2 at loadHelper

Mensagem de erro:

Looking for JS files in
C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon

Loading dependency graph, done. error: bundling failed: ReferenceError: Unknown helper objectSpread2 at loadHelper (C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon\node_modules@babel\helpers\lib\index.js:238:27) at Object.getDependencies (C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon\node_modules@babel\helpers\lib\index.js:279:21) at File.addHelper (C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon\node_modules@babel\core\lib\transformation\file\file.js:204:33) at PluginPass.addHelper (C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon\node_modules@babel\core\lib\transformation\plugin-pass.js:31:22) at PluginPass.ObjectExpression (C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon\node_modules@babel\plugin-proposal-object-rest-spread\lib\index.js:379:25) at newFn (C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon\node_modules@babel\traverse\lib\visitors.js:193:21) at NodePath._call (C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon\node_modules@babel\traverse\lib\path\context.js:53:20) at NodePath.call (C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon\node_modules@babel\traverse\lib\path\context.js:40:17) at NodePath.visit (C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon\node_modules@babel\traverse\lib\path\context.js:88:12) DELTA [android, dev] ....../index.js ▓▓▓▓▓▓▓▓▓░░░░░░░ 56.4% (389/518)::ffff:127.0.0.1 - - [17/Jul/2019:00:07:27 +0000] "GET /index.delta?platform=android&dev=true&minify=false HTTP/1.1" 500 - "-" "okhttp/3.12.1" DELTA [android, dev] ....../index.js ▓▓▓▓▓▓▓▓▓░░░░░░░ 56.4% (389/518), failed.

inserir a descrição da imagem aqui inserir a descrição da imagem aqui

Outra mensagem de erro:

The development server returned response error code: 500

URL: http://10.0.2.2:8081/index.delta?platform=android&dev=true&minify=false

Body: {"type":"TransformError","lineNumber":0,"errors":[{"description":"node_modules\react-native\Libraries\Components\ActivityIndicator\ActivityIndicator.js: Unknown helper objectSpread2","lineNumber":0}],"name":"SyntaxError","message":"node_modules\react-native\Libraries\Components\ActivityIndicator\ActivityIndicator.js: Unknown helper objectSpread2","stack":"ReferenceError: Unknown helper objectSpread2\n at loadHelper (C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon\node_modules\@babel\helpers\lib\index.js:238:27)\n at Object.getDependencies (C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon\node_modules\@babel\helpers\lib\index.js:279:21)\n at File.addHelper (C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon\node_modules\@babel\core\lib\transformation\file\file.js:204:33)\n at PluginPass.addHelper (C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon\node_modules\@babel\core\lib\transformation\plugin-pass.js:31:22)\n at PluginPass.ObjectExpression (C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon\node_modules\@babel\plugin-proposal-object-rest-spread\lib\index.js:379:25)\n at newFn (C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon\node_modules\@babel\traverse\lib\visitors.js:193:21)\n at NodePath._call (C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon\node_modules\@babel\traverse\lib\path\context.js:53:20)\n at NodePath.call (C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon\node_modules\@babel\traverse\lib\path\context.js:40:17)\n at NodePath.visit (C:\Users\sulwork01\Documents\react-native\rn-WhoIsThisPokemon\node_modules\@babel\traverse\lib\path\context.js:88:12)"} processBundleResult BundleDownloader.java:296 access$200 BundleDownloader.java:37 onResponse BundleDownloader.java:174 execute RealCall.java:206 run NamedRunnable.java:32 runWorker ThreadPoolExecutor.java:1162 run ThreadPoolExecutor.java:636 run Thread.java:764

Versão do React-Native react-native-cli: 2.0.1 react-native: 0.59.9

1 Resposta 1

0

Consegui corrigi apagando a pasta node_modules, logo apos reinstalei com npm install e restartando o package: npm start

inserir a descrição da imagem aqui

Você deve fazer log-in para responder a esta pergunta.

Esta não é a resposta que você está procurando? Pesquise outras perguntas com a tag .