Closed l6037600 closed 1 year ago
I am unable to reproduce this on a clean npm create qwik@latest
or by cloning the repro provided. Need better repro instructions. Maybe windows only issue?
I am unable to reproduce this
hi! i have the same problem
pnpm qwik new my-button
@Neschadin can you try with Qwik 1.2.15 pls?
@Neschadin您可以尝试使用 Qwik 1.2.15 吗?
I still get the same error
I have the same error, the problem seems to be at parseTemplatePath in qwil/cli.cjs
the "relative" attribute is undefined, because the split fails. I changed it to this, and it works:
function parseTemplatePath(path3, type) {
// const parts = path3.split(`/${type}/`);
const parts = path3.split(type);
return {
absolute: path3,
relative: parts[1]
};
}
@Neschadin can you try with Qwik 1.2.15 pls?
the same
@Neschadin this happens with pnpm only?
@Neschadin this happens with pnpm only?
yeap
@alex-bluetrain you found the right place to modify. Would you like to drop a PR for that pls?
Which component is affected?
Starters / CLI
Describe the bug
In Utilities section on project structure page, it says by running this command:
It throws an error:
I checked the source code. In my local running environment, (cli.cjs)at line 3034
template.relative
isundefined
.when i specify
template.relative
value, A new error has appeared:Then I modified the code from
fileOutput
to${fileOutput}/index.tsx
and the error disappeared. I also tried changing the dependency package version I don’t know if it’s due to my local operating environment, incompatible versions of dependent packages, or other reasonsReproduction
https://github.com/l6037600/qwik-cli-new-component-error
Steps to reproduce
Run pnpm qwik new button
System Info
Additional Information
No response