Skip to content
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

Tried running in codedamn and got error #6

Open
shreeforcode opened this issue Mar 24, 2024 · 6 comments
Open

Tried running in codedamn and got error #6

shreeforcode opened this issue Mar 24, 2024 · 6 comments

Comments

@shreeforcode
Copy link

Since in windows it is tough to run bun I tried codedamn, reached till final step
"And we're off! If this helps do find https://hrishioa/lumentis and drop a star!"
And then this happened
file:///home/damner/.npm/_npx/50847d26148f9860/node_modules/lumentis/dist/app.js:185
),p.existsSync(d.join(n,"pages"))||p.mkdirSync(d.join(n,"pages"))}i(Te,"writeConfigFiles");function xe(n,e,o){if(p.existsSync(d.join(n,"package.json"))){console.log("Looks like project directory should be set up, skipping...");return}try{Ce(${e.command} ${e.installPrefix} react react-dom next nextra nextra-theme-docs typescript @types/node,{cwd:n,stdio:"inherit"})}catch(a){throw new Error(Failed to install Requirements: ${a})}Te(n,o)}i(xe,"idempotentlySetupNextraDocs");async function ke(n,e,o,a){if(!p.existsSync(o))throw new Error(Pages folder ${o} does not exist);let m=U.find(r=>r.command===a.preferredRunnerForNextra);if(n){let r=Fe(${m.command} run devstart,{cwd:d.join(o,"..")});process.on("exit",()=>{r.kill()}),process.on("SIGINT",()=>{r.kill(),process.exit()})}for(let r=0;r<e.length;r++){let l=e[r],S=r===0?"index":l.section.permalink,y=d.join(o,...l.levels.slice(0,-1));l.levels.length&&!p.existsSync(y)&&p.mkdirSync(y,{recursive:!0}),p.existsSync(d.join(y,"_meta.json"))||p.writeFileSync(d.join(y,"_meta.json"),JSON.stringify({}));let w=JSON.parse(p.readFileSync(d.join(y,"_meta.json"),"utf-8"));w[S]||(w[S]=l.section.title,r===1&&e.find(C=>C.levels.length>1&&C.levels[0]===e[0].section.permalink)&&p.writeFileSync(d.join(o,"_meta.json"),JSON.stringify({...JSON.parse(p.readFileSync(d.join(o,"_meta.json"),"utf-8")),[e[0].section.permalink]:"Basics"})),p.writeFileSync(d.join(y,"_meta.json"),JSON.stringify(w,null,2)));let b=d.join(y,S+".mdx");if(!a.overwritePages&&p.existsSync(b)){console.log(${l.section.title} already exists, skipping...);continue}if(!a.pageGenerationModel)throw new Error("No page generation model set");await x(l.messages,a.pageGenerationModel,4096,a.anthropicKey,a.streamToConsole,${l.levels.join("->")}.mdx,void 0,b,import { Callout, Steps, Step } from "nextra-theme-docs";
^

Error: Pages folder /home/damner/code/pages does not exist
at generatePages (file:///home/damner/.npm/_npx/50847d26148f9860/node_modules/lumentis/dist/app.js:185:533)
at runWizard (file:///home/damner/.npm/_npx/50847d26148f9860/node_modules/lumentis/dist/app.js:231:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

@voidserf
Copy link

you can add a folder called pages to get past this error

@hrishioa
Copy link
Owner

Interesting - could be the pages directory creation is failing when Nextra is being set up. Will test on Windows!

@hrishioa
Copy link
Owner

You can run with npx and npm in Windows, just tested. Can you explain how you got it working in Codedamn? (I couldn't)

@shreeforcode
Copy link
Author

you can add a folder called pages to get past this error

I did this but wasn't able to do, still had issues
Then I tried npm in last step instead of bun and it worked

@shreeforcode
Copy link
Author

You can run with npx and npm in Windows, just tested. Can you explain how you got it working in Codedamn? (I couldn't)

Could you share where you got stuck ?
I kinda followed all your instructions simply
Open Bun playground, run npx etc and then it kinda happened
Copying from github had some issues i guess

Btw, loved your product planning to build some fun stuff over it maybe next weekend

@hrishioa
Copy link
Owner

Codedamn just failed to recognize some of the dependencies, not sure how you got it working! A Loom would be super helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants