When I use bun 1.2.5, it gives an error related to the absence of node.js
{
"name": "my_app",
"private": true,
"scripts": {
"build:res": "NODE_ENV=production rescript",
"build:js": "NODE_ENV=production bun config/bun.config.js",
"build": "bun run build:res && bun run build:js",
"build:css": "NODE_ENV=production postcss --config ./config/postcss.config.js ./app/assets/stylesheets/application.css -o ./app/assets/builds/application.css",
"dev:res": "bun run build:res -w",
"dev:js": "bun run build:js -w",
"dev:css": "bun run build:css -w"
},
"dependencies": {
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@rescript/core": "^1.6.1",
"@rescript/react": "^0.13.1",
"reanalyze": "^2.23.0",
"rescript": "^11.1.4",
"autoprefixer": "^10.4.21",
"cssnano": "^7.0.6",
"postcss": "^8.5.3",
"postcss-cli": "^11.0.0",
"postcss-import": "^16.1.0",
"postcss-nesting": "^13.0.1"
},
"trustedDependencies": [
"reanalyze",
"rescript"
]
}
Got error:
But if I fix it manually in the file node_modules/.bin/rescript first line:
from
to
It's works!
also, if you call bun directly with this file, then everything works:
or call using bun scripts:
Maybe add the ability to configure which interpreter can be used to call this script?
When I use bun 1.2.5, it gives an error related to the absence of node.js
OS: Debian 12
Bun: 1.2.5, installed via
Extension: chenglou92.rescript-vscode 1.62.0
Node.js not installed
Package.json:
{ "name": "my_app", "private": true, "scripts": { "build:res": "NODE_ENV=production rescript", "build:js": "NODE_ENV=production bun config/bun.config.js", "build": "bun run build:res && bun run build:js", "build:css": "NODE_ENV=production postcss --config ./config/postcss.config.js ./app/assets/stylesheets/application.css -o ./app/assets/builds/application.css", "dev:res": "bun run build:res -w", "dev:js": "bun run build:js -w", "dev:css": "bun run build:css -w" }, "dependencies": { "react": "^19.0.0", "react-dom": "^19.0.0" }, "devDependencies": { "@rescript/core": "^1.6.1", "@rescript/react": "^0.13.1", "reanalyze": "^2.23.0", "rescript": "^11.1.4", "autoprefixer": "^10.4.21", "cssnano": "^7.0.6", "postcss": "^8.5.3", "postcss-cli": "^11.0.0", "postcss-import": "^16.1.0", "postcss-nesting": "^13.0.1" }, "trustedDependencies": [ "reanalyze", "rescript" ] }Got error:
But if I fix it manually in the file node_modules/.bin/rescript first line:
from
#!/usr/bin/env nodeto
#!/usr/bin/env bunIt's works!
also, if you call bun directly with this file, then everything works:
or call using bun scripts:
Maybe add the ability to configure which interpreter can be used to call this script?