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

Syntax Error. The requested module '....' does not provide an export named 'default #33

Open
1moeses opened this issue May 8, 2024 · 8 comments

Comments

@1moeses
Copy link

1moeses commented May 8, 2024

I don't know what's going on, but on a solid start project of mine, since 2.0.2, I get the following error:
The requested module '/_build/node_modules/.pnpm/[email protected]/node_modules/debug/src/browser.js?v=d23bb9d6' does not provide an export named 'default'
If you need more information about the repo, please let me know and I'll try to help. With 2.0.1 everything still works fine.

This is my package.json

{
  "name": "test",
  "version": "0.0.0",
  "type": "module",
  "description": "",
  "scripts": {
    "dev": "vinxi dev",
    "build": "vinxi build",
    "start": "vinxi start",
    "lint": "eslint ./src --fix"
  },
  "dependencies": {
    "@solid-primitives/presence": "^0.0.6",
    "@solidjs/router": "^0.13.3",
    "@solidjs/start": "1.0.0-rc.0",
    "@types/js-cookie": "^3.0.6",
    "clsx": "^2.1.1",
    "js-cookie": "^3.0.5",
    "solid-js": "^1.8.17",
    "solid-markdown": "^2.0.3",
    "solid-slider": "^1.3.17",
    "tailwind-merge": "^2.2.2",
    "vinxi": "^0.3.11"
  },
  "engines": {
    "node": ">=18"
  },
  "devDependencies": {
    "@typescript-eslint/eslint-plugin": "^7.8.0",
    "@typescript-eslint/parser": "^7.8.0",
    "autoprefixer": "^10.4.19",
    "eslint": "^8.57.0",
    "eslint-config-airbnb-base": "^15.0.0",
    "eslint-config-airbnb-typescript": "^18.0.0",
    "eslint-config-prettier": "^9.1.0",
    "eslint-import-resolver-typescript": "^3.6.1",
    "eslint-plugin-import": "^2.29.1",
    "eslint-plugin-prettier": "^5.1.3",
    "eslint-plugin-solid": "^0.13.2",
    "eslint-plugin-unused-imports": "^3.2.0",
    "postcss": "^8.4.38",
    "prettier": "^3.2.5",
    "prettier-plugin-tailwindcss": "^0.5.14",
    "tailwindcss": "^3.4.3",
    "typescript": "~5.4.5",
    "vite": "^5.2.11"
  }
}
Screenshot 2024-05-08 at 23 07 19 Screenshot 2024-05-08 at 23 07 13
@andi23rosca
Copy link
Owner

somone else reported this error too, i'm looking into it, will let you know :D

@CM-IV
Copy link

CM-IV commented May 12, 2024

I think I'm also getting something similar to this issue. I'm using Astro with a Tauri Rust application and only doing client-side rendering where SolidJS and your library is concerned.

Version 2.0.1 works for me, with version 2.0.3 I receive an error saying: "SyntaxError: Importing binding name 'default' cannot be resolved by star export entries". This issue completely prevents my SolidJS form from rendering on the page, so for now I'm rolling back versions.

image

@RichDom2185
Copy link

I am using vanilla Solid with no meta-frameworks and also still facing the same issue.

@YvesZelros
Copy link

YvesZelros commented May 31, 2024

It's was not really a good idea to update major dependency version on a patch version :-(

@andi23rosca
Copy link
Owner

Seems like the issue is with one of the dependencies I bumped.
@YvesZelros has a good point, I should've bumped the minor or major version up instead of the patch.

I reverted the version upgrades for now in v2.0.12 of solid-markdown, it should work again.

Haven't found a fix for the import issue yet, but I'll update to 3.0.0 when I do and I can bump the deps again

@Minhir
Copy link

Minhir commented Nov 30, 2024

I solved this by updating my vite config:

 optimizeDeps: {
    include: ["micromark", "unified"]
 }

@age2pierre
Copy link

The issue was fixed in v2.0.12 and v.2.0.13 but reappeared in v2.0.14 (probably after #36).

I had to add this to my vite config to make @Minhir 's workaround work (maybe because I use pnpm, not sure) :

  optimizeDeps: {
    include: ['solid-markdown > micromark', 'solid-markdown > unified'],
  },

@1moeses
Copy link
Author

1moeses commented Feb 4, 2025

The issue was fixed in v2.0.12 and v.2.0.13 but reappeared in v2.0.14 (probably after #36).

I had to add this to my vite config to make @Minhir 's workaround work (maybe because I use pnpm, not sure) :

optimizeDeps: {
include: ['solid-markdown > micromark', 'solid-markdown > unified'],
},

Cool thx I'll try it out in the next few days and report back if it worked out for me as well. thx all for providing helpfull information on this issue!

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

7 participants