nxext / nx-extensions

Nx Extension for StencilJs, SvelteJS, SolidJS, Ionic and VueJs
MIT License
454 stars 99 forks source link

Sveltekit: Cannot generate application #944

Open Soulusions opened 1 year ago

Soulusions commented 1 year ago

Describe the bug Generating a new Sveltekit application fails.

To Reproduce Run pnpm exec nx generate @nxext/sveltekit:application svelte-app in a newly create nx repo.

Expected behavior Running generate should generate the project and not error out.

Additional context Here's the CLI output with the verbose flag:

>  NX  Generating @nxext/sveltekit:application

 >  NX   (0 , project_configuration_1.shouldDefaultToUsingStandaloneConfigs) is not a function

TypeError: (0 , project_configuration_1.shouldDefaultToUsingStandaloneConfigs) is not a function
    at getWorkspaceLayout (/home/soul/nn-nx/node_modules/.pnpm/@nrwl+devkit@14.8.8_nx@16.1.4_typescript@4.9.5/node_modules/@nrwl/devkit/src/utils/get-workspace-layout.js:25:96)
    at normalizeOptions (/home/soul/nn-nx/node_modules/.pnpm/@nxext+sveltekit@14.0.0-next.2_nx@16.1.4_typescript@4.9.5/node_modules/@nxext/sveltekit/src/generators/application/generator.js:19:60)
    at /home/soul/nn-nx/node_modules/.pnpm/@nxext+sveltekit@14.0.0-next.2_nx@16.1.4_typescript@4.9.5/node_modules/@nxext/sveltekit/src/generators/application/generator.js:36:25
    at Generator.next (<anonymous>)
    at /home/soul/nn-nx/node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js:167:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/home/soul/nn-nx/node_modules/.pnpm/tslib@2.5.0/node_modules/tslib/tslib.js:163:16)
    at applicationGenerator (/home/soul/nn-nx/node_modules/.pnpm/@nxext+sveltekit@14.0.0-next.2_nx@16.1.4_typescript@4.9.5/node_modules/@nxext/sveltekit/src/generators/application/generator.js:35:20)
    at Object.<anonymous> (/home/soul/nn-nx/node_modules/.pnpm/nx@16.1.4/node_modules/nx/src/command-line/generate.js:249:36)
    at Generator.next (<anonymous>)

On an additional note, I am using pnpm.

t-mish commented 1 year ago

I think it will be resolved soon. There is a pull request which actually integrates the new Nx's vite instead of the deprecated nxext one. Hope it will be published in near future and everything will be ok

924

skapoor8 commented 1 year ago

Having the exact same issue. Any updates on this?