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

Error: Cannot find module './modules/UnimplementedView' when StyleSheet.create is called #1220

Closed
steida opened this issue Jan 4, 2019 · 3 comments

Comments

@steida
Copy link

steida commented Jan 4, 2019

The problem
I updated Next.js to 8.0.0-canary.2 and when I run StyleSheet.create, this error is thrown:

{ Error: Cannot find module './modules/UnimplementedView'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
    at Function.Module._load (internal/modules/cjs/loader.js:506:25)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object../modules/UnimplementedView (/Users/steida/dev/este-typescript/.next/server/static/development/pages/_app.js:986:18)
    at __webpack_require__ (/Users/steida/dev/este-typescript/.next/server/static/development/pages/_app.js:23:31)
    at Object../node_modules/react-native-web/dist/cjs/index.js (/Users/steida/dev/este-typescript/.next/server/static/development/pages/_app.js:2941:26)
    at __webpack_require__ (/Users/steida/dev/este-typescript/.next/server/static/development/pages/_app.js:23:31)
    at Module../themes/light.ts (/Users/steida/dev/este-typescript/.next/server/static/development/pages/_app.js:3718:70)
    at __webpack_require__ (/Users/steida/dev/este-typescript/.next/server/static/development/pages/_app.js:23:31)
    at Module../pages/_app.tsx (/Users/steida/dev/este-typescript/.next/server/static/development/pages/_app.js:3500:72)
    at __webpack_require__ (/Users/steida/dev/este-typescript/.next/server/static/development/pages/_app.js:23:31)
    at Object.0 (/Users/steida/dev/este-typescript/.next/server/static/development/pages/_app.js:3945:18)
    at __webpack_require__ (/Users/steida/dev/este-typescript/.next/server/static/development/pages/_app.js:23:31)
    at /Users/steida/dev/este-typescript/.next/server/static/development/pages/_app.js:91:18
    at Object.<anonymous> (/Users/steida/dev/este-typescript/.next/server/static/development/pages/_app.js:94:10) code: 'MODULE_NOT_FOUND' }
{ Error: Cannot find module './modules/UnimplementedView'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
    at Function.Module._load (internal/modules/cjs/loader.js:506:25)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)

With Next 7.0.2, everything works as expected.

How to reproduce
Not sure yet, because Next.js is server side framework.

Next.js obviously changed strategy (or bundled webpack), but I don't know if something was fixed or broken.
Maybe React Native Web does not export something correctly (because Next.js canary is ofter very stable), maybe not.

Feel free to close it, I created this issue so people can google it.

@necolas
Copy link
Owner

necolas commented Jan 4, 2019

Yes it's likely a problem with Next.js

@necolas necolas closed this as completed Jan 4, 2019
@heysailor
Copy link

For those googling - configuration for RNW with Next 8 is here: martpie/next-transpile-modules#8 (comment)

@steida
Copy link
Author

steida commented Feb 27, 2019

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