Coder Social home page Coder Social logo

Comments (12)

nicoalbanese avatar nicoalbanese commented on August 24, 2024 2

Hey @zingerj - that's correct, Kirimase only works with the App directory. I will add that to the readme!

from kirimase.

nicoalbanese avatar nicoalbanese commented on August 24, 2024

Hey Peter - double check that you set up kirimase init correctly regarding whether you have a src folder or not (you can see this in the kirimase.config.json file under hasSrc. What I would suggest is running kirimase init again and making sure that if you are using a src folder, you select yes for the first question, otherwise no and it shouldn't show this issue anymore. Let me know.

from kirimase.

peterarusanoff avatar peterarusanoff commented on August 24, 2024

Hey @nicoalbanese, Thanks I did not see run kirimase init in the read me , Funny enough when I do run it it gives me the same error.

Here is the list of the choices that I made, Although I have tried other variations and it still gives me the same error.

? Are you using a 'src' folder? Yes
? Please pick your preferred package manager PNPM
? Select an ORM to use: Prisma
? Please choose your DB type Postgres
? Select an authentication package to use: Auth.js (NextAuth)
? Select a provider to add google, github, apple

## After all installs are completed it crashes 

node:fs:601
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open 'src/app/layout.tsx'
    at Object.openSync (node:fs:601:3)
    at Object.readFileSync (node:fs:469:35)
    at addContextProviderToLayout (file:///Users/.nvm/versions/node/v18.16.1/lib/node_modules/kirimase/dist/commands/add/utils.js:17:28)
    at addNextAuth (file:///Users/.nvm/versions/node/v18.16.1/lib/node_modules/kirimase/dist/commands/add/auth/next-auth/index.js:67:5)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async addPackage (file:///Users/.nvm/versions/node/v18.16.1/lib/node_modules/kirimase/dist/commands/add/index.js:36:17) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'src/app/layout.tsx'
}

from kirimase.

nicoalbanese avatar nicoalbanese commented on August 24, 2024

Thanks for the extra info. This is failing when it is trying to add the various providers to your root layout. Are you running this in a directory where you have a next.js project? Do you have a layout.tsx file? If so where?

Can you send a screenshot of the app directory?

from kirimase.

peterarusanoff avatar peterarusanoff commented on August 24, 2024

Hey @nicoalbanese
I am actually running this in an empty folder each time. When it fails I just delete everything and start again. My thought process is that this would build everything for me including tsc init and npm init. Can I recommend adding these 2 to the init process? This CLI tool came highly recommended! and I am excited to start using it.

from kirimase.

nicoalbanese avatar nicoalbanese commented on August 24, 2024

Hey Peter - understood and thanks for the context. Kirimase is meant to be run after you have created a new nextjs app (with create-next-app). I will add some wording to the readme to clarify this point. Happy to hear it was recommended and hope it helps!

from kirimase.

peterarusanoff avatar peterarusanoff commented on August 24, 2024

you might want to mention that doing tsc --init will crash the builder
as it's not working well with JSON.parse
Also I used create-next-app and it is still giving me the same error.

from kirimase.

nicoalbanese avatar nicoalbanese commented on August 24, 2024

I'm not sure I follow with the usage of tsc. Could you describe each of the steps you are taking from the beginning?

from kirimase.

zingerj avatar zingerj commented on August 24, 2024

@peterarusanoff did you run create-next-app with the pages dir or app dir? If you have pages then I don't think Kirimase will work, right @nicoalbanese?

from kirimase.

smadikanti avatar smadikanti commented on August 24, 2024

I have both the app and pages directories in my project. However, based on our discussion, I'm still facing challenges. Can you assist me in resolving this issue? Thank you!

Screenshot 2023-10-23 at 7 22 05 PM

from kirimase.

smadikanti avatar smadikanti commented on August 24, 2024

Managed to resolve this, thank you!

from kirimase.

nicoalbanese avatar nicoalbanese commented on August 24, 2024

I have changed the init script to only run if app directory is identified to avoid this happening again. Cheers!

from kirimase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.