flexn-io / create

Build apps for web, TVs, desktops, consoles, wearables and more. Developer friendly UI library targeting all form factors platforms. Another notable feature is providing focus management for TVs which very easy to implement using Create.
https://create.flexn.org
MIT License
26 stars 6 forks source link

[web] Error running Harness: Module not found: Can't resolve '../../../../../hooks/navigation' #49

Closed pauliusguzas closed 1 year ago

pauliusguzas commented 1 year ago

0.17.0-alpha.10 (current main)

How to repro: Do npx rnv run -p web -> error

┌──────────────────────────────────────────────────────────────────────────────┐
│  🚀  BUNDLER STARTED | 9/20/2022, 4:53:52 PM                                 │
│  $ rnv run -p web                                                            │
├──────────────────────────────────────────────────────────────────────────────┤
│  ReNative Version: 0.36.0-canary.13                                          │
│  Project Name ($package.name): app-harness                                   │
│  Project Version ($package.version): 0.17.0-alpha.10                         │
│  Workspace ($.workspaceID): flexn                                            │
│  Platform (-p): web                                                          │
│  Engine ($.platforms.web.engine): engine-rn-next                             │
│  Template: @flexn/template@0.17.0-alpha.10                                   │
│  App Config (-c): harness                                                    │
│  Build Scheme (-s): debug                                                    │
│  Supported Platforms: web                                                    │
│  Env Info: darwin | x64 | node v16.14.2                                      │
│  Executed Time: 0h:0m:1s:716ms                                               │
│                                                                              │
│  All good as 🦄                                                              │
│                                                                              │
│  Project location:                                                           │
│  ./platformBuilds/harness_web                                                │
└──────────────────────────────────────────────────────────────────────────────┘
[ task ] [run] runWebDevServer[1]

Dev server running at: http://0.0.0.0:8080

[ task ] [run] parsePlugins[2]
[ task ] [run] parsePlugins[3]
✔ Executing: npx next dev --port 8080

ready - started server on 0.0.0.0:8080, url: http://localhost:8080
The static directory has been deprecated in favor of the public directory. https://nextjs.org/docs/messages/static-dir-deprecated
Found custom dir:/Users/pauliusguzas/Desktop/flexn/flexn/packages/harness/src/pages
info  - Disabled SWC as replacement for Babel because of custom Babel configuration "babel.config.js" https://nextjs.org/docs/messages/swc-disabled
info  - automatically enabled Fast Refresh for 1 custom loader
event - compiled client and server successfully in 3.3s (1126 modules)
Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
wait  - compiling / (client and server)...
error - ./src/screens/TestCases/Performance/Rows/index.js:4:0
Module not found: Can't resolve '../../../../../hooks/navigation'
  2 | import React from 'react';
  3 | import { isPlatformWeb } from '@rnv/renative';
> 4 | import { useNavigate } from "../../../../../hooks/navigation";
  5 | import { Button } from "../../../../components/Button";
  6 | import Screen from "../../../../components/Screen";
  7 | import { themeStyles } from "../../../../config";

Import trace for requested module:
./src/screens/TestCases/Performance/index.js
./src/screens/TestCases/index.web.ts
./src/screens/Home/index.web.js
./src/pages/index.tsx

https://nextjs.org/docs/messages/module-not-found
info  - automatically enabled Fast Refresh for 1 custom loader
info  - automatically enabled Fast Refresh for 1 custom loader
info  - automatically enabled Fast Refresh for 1 custom loader
info  - automatically enabled Fast Refresh for 1 custom loader
info  - automatically enabled Fast Refresh for 1 custom loader
info  - automatically enabled Fast Refresh for 1 custom loader
info  - automatically enabled Fast Refresh for 1 custom loader
info  - automatically enabled Fast Refresh for 1 custom loader
info  - automatically enabled Fast Refresh for 1 custom loader
info  - automatically enabled Fast Refresh for 1 custom loader
info  - automatically enabled Fast Refresh for 1 custom loader
info  - automatically enabled Fast Refresh for 1 custom loader
info  - automatically enabled Fast Refresh for 1 custom loader
info  - automatically enabled Fast Refresh for 1 custom loader
wait  - compiling /_error (client and server)...
event - compiled client and server successfully in 23.3s (1127 modules)
error - src/components/menu.js (23:13) @ eval
TypeError: Cannot read properties of undefined (reading 'create')
  21 | };
  22 |
> 23 | var styles = StyleSheet.create({
     |             ^
  24 |   container: {
  25 |     paddingTop: getScaledValue(hasHorizontalMenu ? 20 : 40),
  26 |     paddingLeft: getScaledValue(hasHorizontalMenu ? 40 : 40),

Expected: App runs

RosaryDarling commented 1 year ago

closing as no longer relevant with newer studio version, will need to retest everything

pauliusguzas commented 1 year ago

@RosaryDarling this is not about studio

GabrieleKaceviciute commented 1 year ago

works on release/1.0