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

[🐞] "Invalid module "@qwik-city-plan" is not a valid package name imported from..." #3641

Closed
tuurbo opened this issue Apr 3, 2023 · 1 comment Β· Fixed by #3687
Closed
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working

Comments

@tuurbo
Copy link
Contributor

tuurbo commented Apr 3, 2023

Which component is affected?

Qwik Runtime

Describe the bug

Adding a library built for Qwik (ex: @modular-forms/qwik) causes an error when running pnpm preview or when trying to serve with a Qwik adapter like express.

❌ TypeError [ERR_INVALID_MODULE_SPECIFIER]: Invalid module "@qwik-city-plan" is not a valid package name imported from C:\_work\websites\qwik-error\node_modules\.pnpm\@builder.io+qwik-city@0.100.0_@builder.io+qwik@0.100.0\node_modules\@builder.io\qwik-city\index.qwik.mjs

See simple example here.
https://stackblitz.com/github/tuurbo/qwik-error
run pnpm preview from terminal

Reproduction

https://stackblitz.com/github/tuurbo/qwik-error

Steps to reproduce

pnpm create qwik
pnpm add @modular-forms/qwik

replace index.tsx with simple example

import { component$ } from "@builder.io/qwik";
import { routeLoader$ } from "@builder.io/qwik-city";
import { useForm } from "@modular-forms/qwik";

export const useFormLoader = routeLoader$<any>(() => ({
  email: "",
  password: "",
}));

export default component$(() => {
  useForm<any>({
    loader: useFormLoader(),
  });

  return <></>;
});

pnpm preview

System Info

stackblitz

--- or ---

  System:
    OS: Windows 10 10.0.19045
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i9-12900HK
    Memory: 15.86 GB / 31.68 GB
  Binaries:
    Node: 18.12.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
    npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (111.0.1661.62)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    @builder.io/qwik: 0.100.0 => 0.100.0
    @builder.io/qwik-city: ~0.100.0 => 0.100.0
    undici: 5.21.0 => 5.21.0
    vite: 4.2.1 => 4.2.1

Additional Information

No response

@tuurbo tuurbo added TYPE: bug Something isn't working STATUS-1: needs triage New issue which needs to be triaged labels Apr 3, 2023
@tuurbo
Copy link
Contributor Author

tuurbo commented Apr 3, 2023

related #3483 #3297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant