Skip to content

Commit c0f0c98

Browse files
authored
Replace bun with node in local-package-repository script (#2319)
## Motivation for the change, related issues Running `npm run local-package-repository` returns the following error when running the `cli.ts` file with `bun` : ``` 17 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 18 | // USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | 20 | "use strict"; 21 | 22 | var binding = require('./build/Release/fs_ext.node'); ^ error: The module 'fs_ext' was compiled against a different Node.js ABI version using NODE_MODULE_VERSION 131. This version of Bun requires NODE_MODULE_VERSION 127. Please try re-compiling or re-installing the module. at <anonymous> (/Users/mho/Work/Projects/Development/Web/Professional/local-package-repository/wordpress-playground/node_modules/fs-ext/fs-ext.js:22:5)## Implementation details ``` Bun's most recent version `1.2.17` requires `NODE_MODULE_VERSION` 127. This means we have to compile `fs_ext` with Node20. @bgrgicak What do you think of replacing `bun` with `node` instead to avoid that issue and the rebuild process? ## Testing Instructions `npm run local-package-repository`
1 parent 5f296a6 commit c0f0c98

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

tools/scripts/local-package-repository.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ printf "%s" "$VERSION" | pbcopy
3636
echo "Version number $VERSION copied to clipboard"
3737
echo "Use Ctrl+C to stop the server"
3838

39-
bun ./packages/playground/cli/src/cli.ts server \
40-
--port=$PORT \
41-
--mount="$HOST_PATH:/wordpress/$VERSION" \
42-
--quiet
39+
node \
40+
--no-warnings \
41+
--experimental-wasm-stack-switching \
42+
--experimental-wasm-jspi \
43+
--loader=./packages/meta/src/node-es-module-loader/loader.mts \
44+
./packages/playground/cli/src/cli.ts server \
45+
--port=$PORT \
46+
--mount="$HOST_PATH:/wordpress/$VERSION" \
47+
--quiet

0 commit comments

Comments
 (0)