-
Notifications
You must be signed in to change notification settings - Fork 946
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
ModuleNotFoundError: Module not found: Error: Can't resolve 'hippy-react' in '/Users/... #25
Comments
Please follow the steps, build the sdk then build the examples. Here's an alias defined in webpack config, to link hippy-react to the local hippy-react source built. It's also noticed in the example. |
BTW: the default home page is read from the name field of package.json. In our example, you need to navigator the http://localhost:8080/hippy-react-demo.html to see the home page. |
仔细看了文档可以运行了 希望尽快出文档啊! 我和小伙伴的很期待啊!!! |
* feat(ohos): ohos framework hippy engine && bundle loader * feat(ohos): bridge interface * feat(ohos): ohos framework type error * feat(ohos): fix resManager null
* feat(ohos): ohos framework hippy engine && bundle loader * feat(ohos): bridge interface * feat(ohos): ohos framework type error * feat(ohos): fix resManager null
Describe the bug
npm run serve Error: ModuleNotFoundError: Module not found: Error: Can't resolve 'hippy-react' in '/Users/...
To Reproduce
Steps to reproduce the behavior:
Expected behavior
open Hippy web page
Screenshots
「wds」: Project is running at http://localhost:8080/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo
✖ 「wdm」: ModuleNotFoundError: Module not found: Error: Can't resolve 'hippy-react' in '/Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/src'
at /Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/node_modules/webpack/lib/Compilation.js:925:10
at /Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/node_modules/webpack/lib/NormalModuleFactory.js:401:22
at /Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/node_modules/webpack/lib/NormalModuleFactory.js:130:21
at /Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/node_modules/webpack/lib/NormalModuleFactory.js:224:22
at /Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/node_modules/neo-async/async.js:2830:7
at /Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/node_modules/neo-async/async.js:6877:13
at /Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/node_modules/webpack/lib/NormalModuleFactory.js:214:25
at /Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/node_modules/enhanced-resolve/lib/Resolver.js:213:14
at /Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)
at /Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:44:7
at /Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/node_modules/tapable/lib/HookCodeFactory.js:33:10), :15:1)
at /Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/node_modules/enhanced-resolve/lib/Resolver.js:285:5
at eval (eval at create (/Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/node_modules/tapable/lib/HookCodeFactory.js:33:10), :27:1)
at /Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:67:43
✖ 「wdm」: resolve 'hippy-react' in '/Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/src'
Parsed request is a module
using description file: /Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/package.json (relative path: ./src)
aliased with mapping 'hippy-react': '/Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web' to '/Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web'
using description file: /Users/qiyuantang/CODE/anthhub/Hippy/examples/hippy-react-demo/package.json (relative path: ./src)
Field 'browser' doesn't contain a valid alias configuration
using description file: /Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web/package.json (relative path: .)
no extension
Field 'browser' doesn't contain a valid alias configuration
/Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web is not a file
.js
Field 'browser' doesn't contain a valid alias configuration
/Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web.js doesn't exist
.jsx
Field 'browser' doesn't contain a valid alias configuration
/Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web.jsx doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web.json doesn't exist
as directory
existing directory
use ./dist/index.js from main in package.json
using description file: /Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web/package.json (relative path: .)
Field 'browser' doesn't contain a valid alias configuration
using description file: /Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web/package.json (relative path: ./dist/index.js)
no extension
Field 'browser' doesn't contain a valid alias configuration
/Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web/dist/index.js doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web/dist/index.js.js doesn't exist
.jsx
Field 'browser' doesn't contain a valid alias configuration
/Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web/dist/index.js.jsx doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web/dist/index.js.json doesn't exist
as directory
/Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web/dist/index.js doesn't exist
using path: /Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web/index
using description file: /Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web/package.json (relative path: ./index)
no extension
Field 'browser' doesn't contain a valid alias configuration
/Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web/index doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web/index.js doesn't exist
.jsx
Field 'browser' doesn't contain a valid alias configuration
/Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web/index.jsx doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/Users/qiyuantang/CODE/anthhub/Hippy/packages/hippy-react-web/index.json doesn't exist
The text was updated successfully, but these errors were encountered: