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

can not include latest fula-client from npm for browser #147

Closed
gitaaron opened this issue Apr 15, 2022 · 0 comments · Fixed by #151
Closed

can not include latest fula-client from npm for browser #147

gitaaron opened this issue Apr 15, 2022 · 0 comments · Fixed by #151
Milestone

Comments

@gitaaron
Copy link
Contributor

Steps to reproduce

  1. Create a basic webapp using a build tool (eg/ webpack, parcel).
  2. Include the functionland/fula library. For example, try making the following change to examples/doc-sync/fuludocs/package.json -
-    "@functionland/fula": "../../../libraries/fula-client/src",
+    "@functionland/fula": "~0.6.0",
  1. Try to run the webapp
> npm install &&  npm start
Server running at http://localhost:1234
� Build failed.

@parcel/core: Failed to resolve '@functionland/fula' from './src/App.js'

  /Users/asurty/POpen/fxland/fula/examples/doc-sync/fuludocs/src/App.js:5:38
    4 | import { BrowserRouter as Router, useLocation } from 'react-router-dom';
  > 5 | import { createClient, Status } from "@functionland/fula";
  >   |                                      ^^^^^^^^^^^^^^^^^^^^
    6 | import { ConnInfo } from "./components/ConnInfo";
    7 | import { BoxConfig } from "./components/BoxConfig";

@parcel/resolver-default: Could not load './dist/index.js' from module '@functionland/fula' found in package.json#browser

  /Users/asurty/POpen/fxland/fula/examples/doc-sync/fuludocs/node_modules/@functionland/fula/package.json:9:13
     8 |   "types": "dist/types/src/index.d.ts",
  >  9 |   "browser": "dist/index.js",
  >    |              ^^^^^^^^^^^^^^^ './dist/index.js' does not exist, did you mean './dist/web/index.js'?'
    10 |   "scripts": {
    11 |     "build": "node scripts/build.js && tsc",

I believe the following change to libraries/fula-client/package.json would fix this (besides publishing a new version to npm) -

- "browser": "dist/index.js",·

+ "browser": "dist/web/index.js"
@gitaaron gitaaron added this to the fula 0.6.1 milestone Apr 15, 2022
@farhoud farhoud linked a pull request Apr 19, 2022 that will close this issue
@farhoud farhoud moved this to Done in Fula and dApps Apr 19, 2022
@gitaaron gitaaron moved this from Done to Done-previous-sprints in Fula and dApps Apr 27, 2022
@gitaaron gitaaron modified the milestones: fula v0.7.0, fula v0.6.0 Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done-previous-sprints
Development

Successfully merging a pull request may close this issue.

1 participant