Skip to content

react-native-web #840

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

Closed
xiaoqianggeaaa opened this issue Feb 28, 2018 · 2 comments
Closed

react-native-web #840

xiaoqianggeaaa opened this issue Feb 28, 2018 · 2 comments

Comments

@xiaoqianggeaaa
Copy link

ERROR in ./index.web.js
Module build failed: F:\cailv\cailv-mobile\node_modules\react-navigation\src\createNavigationContainer.js:1
(function (exports, require, module, __filename, __dirname) { import React from 'react';
^^^^^^

SyntaxError: Unexpected token import
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:607:28)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.get createNavigationContainer [as createNavigationContainer] (F:\cailv\cailv-mobile\node_modules\react-navigation\src\react-navigation.js:6:12)

@walleXD
Copy link

walleXD commented Feb 28, 2018

@xiaoqianggeaaa You need to give all of us more context about what you are trying to do and where you face the issue? Error message without context is just not helpful

@necolas
Copy link
Owner

necolas commented Feb 28, 2018

React navigation doesn't support web. But it looks like the package is not compiled and the node module needs to be compiled as described in the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants