qwik icon indicating copy to clipboard operation
qwik copied to clipboard

running `npm run build.static` fails on empty dist folder

Open shairez opened this issue 3 years ago • 0 comments

Qwik Version

0.10.

Operating System (or Browser)

Windows / Chrome

Node Version (if applicable)

16.15.0

Which component is affected?

Qwik Rollup / Vite plugin

Expected Behaviour

To be able to generate SSG on a blank starter project

Actual Behaviour

REPRODUCE:

  1. Generate a new project
  2. Run qwik add and choose static site generation
  3. Run npm run build.static
  4. See failure:

npm run build.static

> build.static
> vite build --ssr src/entry.static.tsx

vite v3.1.1 building SSR bundle for production...
transforming (42) src\global.css"basename" and "relative" are imported from external module "path" but never used in "node_modules/@builder.io/qwik-city/static/node/index.mjs" and "src/entry.static.js".

✓ 44 modules transformed.

server/entry.static.js   197.63 KiB

[Error: ENOENT: no such file or directory, open 'C:\dev\workspace\websites\qwiksite\dist\service-worker.js'] {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'C:\\dev\\workspace\\websites\\qwiksite\\dist\\service-worker.js'
}

Additional Information

The dist folder is not being generated and it seems as if rollup is trying to load the service-workere file from there.

This is happening on a brand new project, no code was added

(It ran on Windows if it's relevant )

maybe related to #1488 (and maybe not)

shairez avatar Oct 09 '22 13:10 shairez