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

SyntaxError: The requested module 'solid-js/web' does not provide an export named 'effect' #5943

Closed
6 tasks done
btakita opened this issue Aug 7, 2022 · 7 comments
Closed
6 tasks done

Comments

@btakita
Copy link

btakita commented Aug 7, 2022

Check that this is really a bug

  • I confirm

Reproduction link

https://github.com/btakita/wholly-trinity/tree/swiper-solid-issue

Bug description

The compiled solid-js component does not seem compatible with the current version of solid-start.

Expected Behavior

Successful import of solid-js component.

Actual Behavior

file:///home/brian/work/stargate/wholly-trinity/node_modules/.pnpm/[email protected]/node_modules/swiper/solid/loop.js:2
import { effect as _$effect } from "solid-js/web";
         ^^^^^^
SyntaxError: The requested module 'solid-js/web' does not provide an export named 'effect'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)

Swiper version

8.3.2

Platform/Target and Browser Versions

Arch Linux all browsers

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@btakita
Copy link
Author

btakita commented Aug 7, 2022

A similar issue occurred with the svelte components.

The solution was to include the *.svelte files.

@jchatard
Copy link

jchatard commented Aug 9, 2022

I can confirm the bug, @btakita how did you solve the problem with Solid?

@btakita
Copy link
Author

btakita commented Aug 9, 2022

I ended up not using a slider for the project...but will like to use this swiper with solidjs someday. I had a similar issue w/ the sveltejs + sapper + rollup integration. To solve that issue, the *.svelte components were distributed in the npm package. Many solidjs developers will be using solid-start, which uses vite, rollup, & webpack. Ideally, the .jsx/.tsx files would be distributed, but nodejs + esm does not seem to be able to load jsx/tsx without it being transpiled.

@EliBates
Copy link

Just ran into this issue using Astro trying to implement Swiper in Solid.

@jagu-sayan
Copy link

@nolimits4web It is possible to do a new release ? Thanks for your awesome library.

@timothyallan
Copy link

My build fails now with the release of 8.4.0, using Vite 3.0.9

Error: Build failed with 2 errors:
../node_modules/swiper/solid/swiper-slide.js:71:4: ERROR: The JSX syntax extension is not currently enabled
../node_modules/swiper/solid/swiper.js:210:4: ERROR: The JSX syntax extension is not currently enabled

Trying to enable the syntax extension causes more errors elsewhere. Anyone got a quick fix?

@tweenietomatoes
Copy link

tweenietomatoes commented Sep 20, 2022

same issue with astro + solidjs router package.

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

6 participants