SalesforceCommerceCloud / pwa-kit

React-based JavaScript frontend framework to create a progressive web app (PWA) storefront for Salesforce B2C Commerce.
https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/pwa-kit-overview.html
BSD 3-Clause "New" or "Revised" License
283 stars 130 forks source link

[BUG] Node v16.x #795

Closed benramsay closed 1 year ago

benramsay commented 1 year ago

Summary

As described by the quick start, we are asked to use : Node 14.x and NPM 6.14.x. But I am using other library asking for : Node : v16.14.0 and NPM : 8.14.0 If I go with the second configuration it is not working and gives me the following ERROR.

Steps To Reproduce

USING : Node : v16.14.0 and NPM : 8.14.0

npx pwa-kit-create-app@latest --preset retail-react-app-demo cd pwa-kit-starter-project npm start

ERROR

SyntaxError: The "req1-ssr-overall-start" performance mark has not been set at getMark (node:internal/perf/usertiming:54:11) at calculateStartDuration (node:internal/perf/usertiming:137:13) at EventTarget.measure (node:internal/perf/usertiming:155:7) at PerformanceTimer.end (D:\Work\ToTest\salesforce\pwa-kit-starter-project\node_modules\pwa-kit-runtime\utils\ssr-server\performance-timer.js:117:29) at ServerResponse.done (D:\Work\ToTest\salesforce\pwa-kit-starter-project\node_modules\pwa-kit-runtime\ssr\server\build-remote-server.js:909:11) at ServerResponse.emit (node:events:532:35) at onFinish (node:_http_outgoing:830:10) at afterWrite (node:internal/streams/writable:497:5) at afterWriteTick (node:internal/streams/writable:484:10) at processTicksAndRejections (node:internal/process/task_queues:82:21) Command failed: node D:\Work\ToTest\salesforce\pwa-kit-starter-project\app\ssr.js

kevinxh commented 1 year ago

Hey @benramsay , thanks for reporting this! Unfortunately this is a known issue with Node v16 at the moment. It's on our roadmap to support node 16 soon. I'll come back to this issue when this is fixed. Thanks for your patience!

bfeister commented 1 year ago

This is in active development now with @raiyaj https://github.com/SalesforceCommerceCloud/pwa-kit/pull/965