$ stencil bundle
fs.js:44
} = primordials;
^
ReferenceError: primordials is not defined
at fs.js:44:5
at req_ (node_modules/@bigcommerce/stencil-cli/node_modules/natives/index.js:143:24)
at Object.req [as require] node_modules/@bigcommerce/stencil-cli/node_modules/natives/index.js:55:10)
at Object.<anonymous> (node_modules/@bigcommerce/stencil-cli/node_modules/jspm/node_modules/graceful-fs/fs.js:1:37)
at Module._compile (node:internal/modules/cjs/loader:1529:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1613:10)
at Module.load (node:internal/modules/cjs/loader:1275:32)
at Module._load (node:internal/modules/cjs/loader:1096:12)
at Module.require (node:internal/modules/cjs/loader:1298:19)
at require (node:internal/modules/helpers:182:18)
Node.js v20.19.0
Steps to reproduce
stencil initnormally, selectingyarnas your package manager (may not be required)nvm use 20.19ordocker run -it --rm -v $(pwd):/usr/src/project -w /usr/src/project node:20.19) runyarn installstencil bundleResolving the issue
Repeat the above steps with Node 20.18 and
stencil bundlewill succeed as expected.