Skip to content
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

Doesn't work on NextJS #159

Open
Dylanb-dev opened this issue Jun 7, 2019 · 4 comments
Open

Doesn't work on NextJS #159

Dylanb-dev opened this issue Jun 7, 2019 · 4 comments
Labels
community community driven feature/bug

Comments

@Dylanb-dev
Copy link

Dylanb-dev commented Jun 7, 2019

When trying to build on NextJS + RNW there is an error.

TypeError: (0 , _defineProperty.default) is not a function ...

Example with next-transpile-modules repo:
https://github.com/lolcookie/react-native-web-nextjs-typescript-firebase/tree/react-native-popup
failing command:
npm run build-app

next-transpile-modules is used to prevent { Error: Cannot find module 'react-native'...
according to this issue
Simplified example:
https://github.com/lolcookie/react-native-popup-menu-nextjs
failing command:
npm run dev
with
{ Error: Cannot find module 'react-native'...

EDIT:
I found a possible solution here:
martpie/next-transpile-modules#8 (comment)

@sodik82
Copy link
Contributor

sodik82 commented Jun 7, 2019

Thanks for letting us know. RNW is supported by community. Maybe someone can help :)

Not sure what next-transpile-modules does but afaik popup menu is already transpiled. Do you need it for RNW and popup menu?

Just for reference, this seems to be the commit Dylanb-dev/react-native-web-nextjs-typescript-firebase@25a6b49

@sodik82 sodik82 added the community community driven feature/bug label Jun 7, 2019
@Dylanb-dev
Copy link
Author

@sodik82 Thanks for getting back to me, I have created another repo from the nextjs example with just react popup menu added, it fails on npm run dev with { Error: Cannot find module 'react-native'...

https://github.com/lolcookie/react-native-popup-menu-nextjs

@sodik82
Copy link
Contributor

sodik82 commented Jun 9, 2019

I found a possible solution here:
martpie/next-transpile-modules#8 (comment)

does it works now?

@Dylanb-dev
Copy link
Author

@sodik82 yes but running the production build is failing with the same error, I will have to try to replicate it. I was hoping finding a solution without transpiling the modules was possible.

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

No branches or pull requests

2 participants