-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[0.18-rc][packager] Packager throws error "Cannot read property 'error' of null" instead of babel errors #5191
Comments
Hey corbt, thanks for reporting this issue! React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.
|
cc @martinbigio, it looks like the packager has an error while trying to report errors. |
For what it's worth I just tested running with the same syntax error on master and the babel error message appeared correctly, so it looks like this has already been fixed. It's probably just a question of figuring out what to cherry-pick into the 0.18 branch. |
Also I recently noticed that packager no longer reports errors when it fails to import/require a module. |
I also encounter the same issue on react-native 0.18.0-rc. It's very easy to re-produce it, just create a new project, If change package.json the react-native version from 0.18.0-rc to 0.17.0, and update the node-modules/react-native by So, it must be something wrong with react-native v0.18.0-rc. |
I'm getting the exact same error by updating react 0.17 to 0.18.0-rc |
Looks like this is something we should fix asap, I'll ping @martinbigio about it. |
Thanks so much for using the rc everyone! |
Maybe it's caused by |
This was already fixed on master last week. We need to cherry pick 5a4ee0b :) |
thanks all, waiting for release. |
When i upgrade react-native from 0.17.0 to 0.18.0-rc , I faced same problem , and i try to apply 5a4ee0b ,I got babel error about
my environment:
|
@jinzhaoyu, the error you're getting is unrelated to this issue. The problem is that you have a |
+1, waiting for fixing, thx :-) |
0.18 is out now and this problem has been fixed! |
@corbt |
The problem still exists in 0.18.0 ,when i execute 'bundle' command ,i got same as 0.18-rc error:
|
Still need to remove .babelrc manually. |
@int64ago that looks like a different bug. It does look like you're running into some kind of trouble though, do you run into that error on a fresh project? @jinzhaoyu this is also a different bug, notice that the error message is different. Would you mind opening a new issue with steps to reproduce? It looks like it may be related to #5040 but that should be fixed. For now you can remove the offending /test/react-native/node_modules/react-native/node_modules/react-transform-hmr/node_modules/react-proxy/.babelrc file like @tdzl2003 said which should unblock you. |
It's the same bug as #5259 which referenced by this issue. |
From #5259:
Can you do that and tell me what you see? |
Almost the same as:
|
Ok try the following from the command line and post back the response here:
|
Ok, I tried again with a new project start with
And then I run
Here's my environment: |
It works. |
I have remove .babelrc manually . but no use. |
@gaearon didn't you ship a version of |
@int64ago rm project_folder/node_modules/react-deep-force-update/.bablerc |
for me it still didnt work after removing .bablerc |
@martinbigio yeah, it still didn't work after removing .bablerc file. when I remove it and execute the c:\Users\azheng\Desktop\reactNativeApp\node_modules\babel-core\lib\transformation\file\logger.js:41
throw new Constructor(this._buildMessage(msg));
^
ReferenceError: [BABEL] c:\Users\azheng\Desktop\reactNativeApp\node_modules\react-native\local-cli\bundle\bundle.js: Unknown option: base.stage
at Logger.error (c:\Users\azheng\Desktop\reactNativeApp\node_modules\babel-core\lib\transformation\file\logger.js:41:11)
at OptionManager.mergeOptions (c:\Users\azheng\Desktop\reactNativeApp\node_modules\babel-core\lib\transformation\file\options\option-manager.js:262:18)
at OptionManager.init (c:\Users\azheng\Desktop\reactNativeApp\node_modules\babel-core\lib\transformation\file\options\option-manager.js:416:10)
at File.initOptions (c:\Users\azheng\Desktop\reactNativeApp\node_modules\babel-core\lib\transformation\file\index.js:191:75)
at new File (c:\Users\azheng\Desktop\reactNativeApp\node_modules\babel-core\lib\transformation\file\index.js:122:22)
at Pipeline.transform (c:\Users\azheng\Desktop\reactNativeApp\node_modules\babel-core\lib\transformation\pipeline.js:42:16)
at Object.transformFileSync (c:\Users\azheng\Desktop\reactNativeApp\node_modules\babel-core\lib\api\node.js:116:10)
at compile (c:\Users\azheng\Desktop\reactNativeApp\node_modules\babel-register\lib\node.js:102:20)
at loader (c:\Users\azheng\Desktop\reactNativeApp\node_modules\babel-register\lib\node.js:130:14)
at Object.require.extensions.(anonymous function) [as .js] (c:\Users\azheng\Desktop\reactNativeApp\node_modules\babel-register\lib\node.js:140:7) my environment is : |
@ShadowZheng does this repro after removing your node modules doing npm install? It's possible that you fetched a module that has a .babelrc. Also please do a search on the node_modules directory and make sure there's no file named .babelrc |
it worked after i followed this http://stackoverflow.com/questions/34975286/reactnativecli-init-helloworld-project-build-error-with-babel-transformerror |
This is to track the error first reported in #5188 and #5190. (The thread in #5188 got long because we weren't sure if it was related to the simultaneous but unrelated babel classProperties syntax change, so I'm consolidating here.)
There's a regression in the packager in 0.18-rc where babel syntax errors aren't passed through to the user, making it difficult to fix the underlying bugs. These are the error messages for the same bug running
react-native bundle
:React Native 0.17
React Native 0.18-rc
The text was updated successfully, but these errors were encountered: