-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Redwood (Vite framework) #4207
Comments
|
Update after the WriteStream was merged: my-redwood-project4 on main [?] via 🍞 v0.7.4
➜ bun --bun redwood dev
[0.04ms] ".env"
execa/lib/errname: unable to establish process.binding('uv') 1 | (function (bindingName){"use strict";if(bindingName==="constants")return @processBindingConstants;const issue={fs:3546,buffer:2020,natives:2254,uv:2891}[bindingName];if(issue)throw new Error(`process.binding("${bindingName}") is not implemented in Bun. Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/${issue}`);@throwTypeError(`process.binding("${bindingName}") is not implemented in Bun. If that breaks something, please file an issue and include a reproducible code sample.`)})
^
error: process.binding("uv") is not implemented in Bun. Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/2891
at binding (:1:20)
at /Users/admin/repos/redwood-test/my-redwood-project4/node_modules/envinfo/dist/envinfo.js:1:0
at n (/Users/admin/repos/redwood-test/my-redwood-project4/node_modules/envinfo/dist/envinfo.js:1:33779)
at /Users/admin/repos/redwood-test/my-redwood-project4/node_modules/envinfo/dist/envinfo.js:1:127871
at n (/Users/admin/repos/redwood-test/my-redwood-project4/node_modules/envinfo/dist/envinfo.js:1:33779)
at /Users/admin/repos/redwood-test/my-redwood-project4/node_modules/envinfo/dist/envinfo.js:1:127237
at n (/Users/admin/repos/redwood-test/my-redwood-project4/node_modules/envinfo/dist/envinfo.js:1:33779)
at /Users/admin/repos/redwood-test/my-redwood-project4/node_modules/envinfo/dist/envinfo.js:1:126295
at n (/Users/admin/repos/redwood-test/my-redwood-project4/node_modules/envinfo/dist/envinfo.js:1:33779)
at /Users/admin/repos/redwood-test/my-redwood-project4/node_modules/envinfo/dist/envinfo.js:1:124410
[0.02ms] ".env"
execa/lib/errname: unable to establish process.binding('uv') 1 | (function (bindingName){"use strict";if(bindingName==="constants")return @processBindingConstants;const issue={fs:3546,buffer:2020,natives:2254,uv:2891}[bindingName];if(issue)throw new Error(`process.binding("${bindingName}") is not implemented in Bun. Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/${issue}`);@throwTypeError(`process.binding("${bindingName}") is not implemented in Bun. If that breaks something, please file an issue and include a reproducible code sample.`)})
^
error: process.binding("uv") is not implemented in Bun. Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/2891
at binding (:1:20)
at /Users/admin/repos/redwood-test/my-redwood-project4/node_modules/envinfo/dist/envinfo.js:1:0
at n (/Users/admin/repos/redwood-test/my-redwood-project4/node_modules/envinfo/dist/envinfo.js:1:33779)
at /Users/admin/repos/redwood-test/my-redwood-project4/node_modules/envinfo/dist/envinfo.js:1:127871
at n (/Users/admin/repos/redwood-test/my-redwood-project4/node_modules/envinfo/dist/envinfo.js:1:33779)
at /Users/admin/repos/redwood-test/my-redwood-project4/node_modules/envinfo/dist/envinfo.js:1:127237
at n (/Users/admin/repos/redwood-test/my-redwood-project4/node_modules/envinfo/dist/envinfo.js:1:33779)
at /Users/admin/repos/redwood-test/my-redwood-project4/node_modules/envinfo/dist/envinfo.js:1:126295
at n (/Users/admin/repos/redwood-test/my-redwood-project4/node_modules/envinfo/dist/envinfo.js:1:33779)
at /Users/admin/repos/redwood-test/my-redwood-project4/node_modules/envinfo/dist/envinfo.js:1:124410
api | [0.03ms] ".env"
gen | [0.02ms] ".env"
api | [0.02ms] ".env"
gen | [0.02ms] ".env"
web | Usage Error: The nearest package directory (/Users/admin/repos/redwood-test/my-redwood-project4/web) doesn't seem to be part of the project declared in /Users/admin/repos/redwood-test/my-redwood-project4.
web |
web | - If /Users/admin/repos/redwood-test/my-redwood-project4 isn't intended to be a project, remove any yarn.lock and/or package.json file there.
web | - If /Users/admin/repos/redwood-test/my-redwood-project4 is intended to be a project, it might be that you forgot to list web in its workspace configuration.
web | - Finally, if /Users/admin/repos/redwood-test/my-redwood-project4 is fine and you intend web to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.
web |
web | $ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...
web | yarn cross-env NODE_ENV=development rw-vite-dev exited with code 0
api | Internal Error: Invalid stdio option
api | yarn cross-env NODE_ENV=development NODE_OPTIONS=--enable-source-maps yarn nodemon --quiet --watch "/Users/admin/repos/redwood-test/my-redwood-project4/redwood.toml" --exec "yarn rw-api-server-watch --port 8911 --debug-port 18911 | rw-log-formatter" exited with code 0
gen | Internal Error: Invalid stdio option
gen | yarn rw-gen-watch exited with code 0 |
It could seem like redwood is heavily invested in yarn, to an extend that makes it incompatible with both npm, pnpm and arguably bun as well. It's still valuable to get bun capabilities on par with node, npm and pnpm, but it doesn't seem feasible to invest too much time on this until the redwood codebase is refactored to support non-yarn toolchains. |
Returns this: ➜ bun --bun redwood dev
[0.04ms] ".env"
┌ Error ─────────────────────────────────────────────────┐
│ │
│ TypeError: (0, _yargs.default) is not a function. │
│ (In '(0, _yargs.default)((0, │
│ _helpers.hideBin)(process.argv))', '(0, │
│ _yargs.default)' is "/Users/admin/repos/redwood-te │
│ st/my-redwood-project4/node_modules/yargs/yargs") │
│ at <anonymous> (/Users/admin/repos/redwood-test/my │
│ -redwood-project4/node_modules/@redwoodjs/cli/dist │
│ /index.js:168:10) │
│ at runYargs (/Users/admin/repos/redwood-test/my-re │
│ dwood-project4/node_modules/@redwoodjs/cli/dist/in │
│ dex.js:160:16) │
│ at <anonymous> (/Users/admin/repos/redwood-test/my │
│ -redwood-project4/node_modules/@redwoodjs/cli/dist │
│ /index.js:138:6) │
│ at <anonymous> (/Users/admin/repos/redwood-test/my │
│ -redwood-project4/node_modules/@redwoodjs/cli/dist │
│ /index.js:120:66) │
│ at run (node:async_hooks:70:6) │
│ at <anonymous> (/Users/admin/repos/redwood-test/my │
│ -redwood-project4/node_modules/@redwoodjs/cli/dist │
│ /index.js:120:60) │
│ at main (/Users/admin/repos/redwood-test/my-redwoo │
│ d-project4/node_modules/@redwoodjs/cli/dist/index. │
│ js:112:6) │
│ at <anonymous> (/Users/admin/repos/redwood-test/my │
│ -redwood-project4/node_modules/@redwoodjs/cli/dist │
│ /index.js:193:5) │
│ at global code (/Users/admin/repos/redwood-test/my │
│ -redwood-project4/node_modules/@redwoodjs/cli/dist │
│ /index.js:120:8) │
│ at anonymous (native) │
│ │
│ -------------------------------------------------- │
│ │
│ Need help? │
│ - Not sure about something or need advice? Reach │
│ out on our Forum │
│ - Think you've found a bug? Open an issue on our │
│ GitHub │
│ - Here's your unique error reference to quote: │
│ '60fe3334-202c-4819-a070-82de5ab359c1' │
│ │
└────────────────────────────────────────────────────────┘
error: "redwood" exited with code 1 (SIGHUP) |
minimal repro the .cjs file extension is not present on a file in yargs. that messes this up. |
Version used: 1.1.8-canary.1+1fd021e1c What works now is bunx create-redwood-app my-redwood-project --typescript
cd my-redwood-project
yarn install
bun --bun redwood dev remaining issuesCreating with bunx --bun output➜ bunx --bun create-redwood-app my-redwood-project3 --typescript
------------------------------------------------------------------
🌲⚡️ Welcome to RedwoodJS! ⚡️🌲
------------------------------------------------------------------
580 | `):i=s.text.split(`
581 | `),s.border&&(i.unshift("."+"-".repeat(this.negatePadding(s)+2)+"."),i.push("'"+"-".repeat(this.negatePadding(s)+2)+"'")),s.padding&&(i.unshift(...new Array(s.padding[az]||0).fill("")),i.push(...new Array(s.padding[uz]||0).fill(""))),i.forEach((a,u)=>{t[u]||t.push([]);let c=t[u];for(let l=0;l<o;l++)c[l]===void 0&&c.push("");c.push(a)})}),t}negatePadding(e){let t=e.width||0;return e.padding&&(t-=(e.padding[Up]||0)+(e.padding[xp]||0)),e.border&&(t-=4),t}columnWidths(e){if(!this.wrap)return e.map(o=>o.width||$r.stringWidth(o.text));let t=e.length,n=this.width,i=e.map(o=>{if(o.width)return t--,n-=o.width,o.width}),s=t?Math.floor(n/t):0;return i.map((o,a)=>o===void 0?Math.max(s,cz(e[a])):o)}};function LI(r,e,t){return r.border?/[.']-+[.']/.test(e)?"":e.trim().length!==0?t:" ":""}function cz(r){let e=r.padding||[],t=1+(e[Up]||0)+(e[xp]||0);return r.border?t+4:t}function lz(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function fz(r,e){r=r.trim();let t=$r.string | ... truncated
582 | `),i+=r.charAt(s);return t&&n&&(i=`${t}${i}${n}`),i}function j_(r){return NI(r,{stringWidth:e=>[...e].length,stripAnsi:F_,wrap:xI})}import{dirname as UI,resolve as VI}from"path";import{readdirSync as dz,statSync as hz}from"fs";function BI(r,e){let t=VI(".",r),n;for(hz(t).isDirectory()||(t=UI(t));;){if(n=e(t,dz(t)),n)return VI(t,n);if(t=UI(n=t),n===t)break}}import{inspect as Oz}from"util";import{readFileSync as vz}from"fs";import{fileURLToPath as Dz}from"url";import{basename as Cz,dirname as wz,extname as Pz,relative as Rz,resolve as qI}from"path";import{readFileSync as mz,statSync as gz,writeFile as Ez}from"fs";import{format as _z}from"util";import{resolve as Sz}from"path";var FI={fs:{readFileSync:mz,writeFile:Ez},format:_z,resolve:Sz,exists:r=>{try{return gz(r).isFile()}catch{return!1}}};var In,G_=class{constructor(e){e=e||{},this.directory=e.directory||"./locales",this.updateFiles=typeof e.updateFiles=="boolean"?e.updateFiles:!0,this.locale=e.locale||"en",this.fallbackToLanguage=typeof e.fallbackToLanguage= | ... truncated
583 | `)[0]}),yc.trace.getActiveSpan()?.recordException(r)}var cH="Initial commit",{telemetry:ipe}=Kc(bp(process.argv),{boolean:["telemetry"],default:{telemetry:process.env.REDWOOD_DISABLE_TELEMETRY===void 0||process.env.REDWOOD_DISABLE_TELEMETRY===""}}),ke=new nt.RedwoodTUI;function spe(){let{npm_config_user_agent:r}=process.env;if(r){let e=r.match(/yarn\/(\d+)/);if(e&&e[1])return parseInt(e[1],10)>=2}return!1}var aH=[" As an alternative solution, you can launch a Redwood project using GitPod instead. GitPod is a an online IDE.",` See: ${(0,cc.default)("Launch Redwood using GitPod","https://gitpod.io/#https://github.com/redwoodjs/starter",{fallback:()=>"Launch Redwood using GitPod https://gitpod.io/#https://github.com/redwoodjs/starter"})}`];async function ope(r){let e=new nt.ReactiveTUIContent({mode:"text",content:"Checking node and yarn compatibility",spinner:{enabled:!0}});ke.startReactive(e);let[t,n]=await ape(r);if(t){e.update({spinner:{enabled:!1},content:`${nt.RedwoodStyling.green("\u2714")} Compatibility | ... truncated
584 | `)),Tr("Compatibility checks failed"),await rr(),process.exit(1)),ke.stopReactive(!0),ke.displayWarning("Compatibility checks failed",[" You may want to downgrade the version of node you're using.",` You're using ${n.node.version.version} and we currently support node ${n.node.wanted.range}.`,""," This may make your project incompatible with some deploy targets, especially those using AWS Lambdas.",""," Please use tools like nvm or corepack to change to a compatible version.",` See: ${(0,cc.default)("How to - Use nvm","https://redwoodjs.com/docs/how-to/using-nvm",{fallback:()=>"How to - Use nvm https://redwoodjs.com/docs/how-to/using-nvm"})}`,` See: ${(0,cc.default)("Tutorial - Prerequisites","https://redwoodjs.com/docs/tutorial/chapter1/prerequisites",{fallback:()=>"Tutorial - Prerequisites https://redwoodjs.com/docs/tutorial/chapter1/prerequisites"})}`,"",...aH].join(`
585 | `));try{(await ke.prompt({type:"select",name:"override-engine-error",message:"How would you like to proceed?",choices:["Override error and continue install","Quit install"],initial:0}))["override-engine-error"]==="Quit install"&&(Tr("User quit after engine check error"),await rr(),process.exit(0))}catch{Tr("User cancelled install at engine check error"),await rr(),process.exit(1)}}}function ape(r){return new Promise(e=>{let{engines:t}=hi.default.readJSONSync(Wn.join(r,"package.json"));(0,uH.default)(t,(n,i)=>e([i.isSatisfied,i.versions]))})}async function upe(r,{templateDir:e,overwrite:t}){let n=r,i=new nt.ReactiveTUIContent({mode:"text",content:"Creating project files",spinner:{enabled:!0}});return ke.startReactive(i),n=await sv(n,{overwrite:t}),hi.default.ensureDirSync(Wn.dirname(n)),hi.default.copySync(e,n,{overwrite:t}),hi.default.renameSync(Wn.join(n,"gitignore.template"),Wn.join(n,".gitignore")),hi.default.ensureDirSync(Wn.join(n,".redwood")),hi.default.writeFileSync(Wn.join(n,".redwood","telemetry.txt" | ... truncated
TypeError: undefined is not an object (evaluating 'i.isSatisfied')
at /private/tmp/bunx-501-create-redwood-app@latest/node_modules/create-redwood-app/dist/create-redwood-app.js:585:534
at /private/tmp/bunx-501-create-redwood-app@latest/node_modules/create-redwood-app/dist/create-redwood-app.js:17:123
at c (/private/tmp/bunx-501-create-redwood-app@latest/node_modules/create-redwood-app/dist/create-redwood-app.js:7:22430)
at o (/private/tmp/bunx-501-create-redwood-app@latest/node_modules/create-redwood-app/dist/create-redwood-app.js:7:22452)
at a (/private/tmp/bunx-501-create-redwood-app@latest/node_modules/create-redwood-app/dist/create-redwood-app.js:7:22495)
at /private/tmp/bunx-501-create-redwood-app@latest/node_modules/create-redwood-app/dist/create-redwood-app.js:7:22545
at exitHandler (node:child_process:69:45)
at emit (node:events:161:95)
at #maybeClose (node:child_process:791:27)
at #handleOnExit (node:child_process:587:31)
⠏ Checking node and yarn compatibility Installing with bun --bun redwood dev output➜ bun --bun redwood dev
✔ Generating the Prisma client...
gen | Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)
gen |
gen | $ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require #0] <scriptName> ...
api | Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)
api |
api | $ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require #0] <scriptName> ...
web | Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)
web |
web | $ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require #0] <scriptName> ...
gen | yarn rw-gen-watch exited with code 1
api | yarn cross-env NODE_ENV=development NODE_OPTIONS="--enable-source-maps" yarn nodemon --quiet --watch "/Users/admin/repos/bun-kitchensink/my-redwood-project5/redwood.toml" --exec "yarn rw-api-server-watch --port 8911 --debug-port 18911 | rw-log-formatter" exited with code 1
web | yarn cross-env NODE_ENV=development rw-vite-dev exited with code 1 |
Redwood - GitHub - Website
What version of Bun is running?
0.7.3
What platform is your computer?
Darwin 22.5.0 arm64 arm
What steps can reproduce the bug?
yarn create redwood-app my-redwood-project --typescript
(step through all with defaults)cd my-redwood-project
yarn rw dev
bun --bun redwood dev
What is the expected behavior?
What do you see instead?
Additional information
No response
The text was updated successfully, but these errors were encountered: