ElMassimo / iles

🏝 The joyful site generator
https://iles.pages.dev
MIT License
1.08k stars 31 forks source link

Reference Error "performance" with starter duing the build #7

Closed ziopod closed 2 years ago

ziopod commented 2 years ago

After fresh new install:

$ pnpm init iles@next
$ cd my-project
$ pnpm i
$ pnpm build

I got this error:

iles v0.2.2 vite v2.6.7
build error:
 ReferenceError: performance is not defined
    at withSpinner (/Volumes/vite/iles/node_modules/.pnpm/iles@0.2.2/node_modules/iles/dist/node/chunk-O4XPOHQQ.js:6:21)
    at build (/Volumes/vite/iles/node_modules/.pnpm/iles@0.2.2/node_modules/iles/dist/node/chunk-SPI2F72X.js:27:61)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
 ELIFECYCLE  Command failed with exit code 1.

My environment:

ziopod commented 2 years ago

Same issue with "the-vue-point" and Yarn:

yarn run v1.22.10
$ iles build
iles v0.2.2 vite v2.6.7
build error:
 ReferenceError: performance is not defined
    at withSpinner (/Volumes/vite/the-vue-point/node_modules/iles/dist/node/chunk-O4XPOHQQ.js:6:21)
    at build (/Volumes/vite/the-vue-point/node_modules/iles/dist/node/chunk-SPI2F72X.js:27:61)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
error Command failed with exit code 1.
ElMassimo commented 2 years ago

Thanks for reporting!

It seems related with Node 14, where performance is not globally available (unlike in Node 16).

Releasing a patch soon 😃

ElMassimo commented 2 years ago

Should be fixed in iles@0.2.3, thanks for providing information about your environment!