Comments (12)
Hey @zingerj - that's correct, Kirimase only works with the App directory. I will add that to the readme!
from kirimase.
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.
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.
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.
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.
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.
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.
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.
@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.
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](https://private-user-images.githubusercontent.com/31075637/277503151-d90388c9-dea8-4203-bf6e-e54fc2ad82f1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzOTg4NjUsIm5iZiI6MTcyNDM5ODU2NSwicGF0aCI6Ii8zMTA3NTYzNy8yNzc1MDMxNTEtZDkwMzg4YzktZGVhOC00MjAzLWJmNmUtZTU0ZmMyYWQ4MmYxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIzVDA3MzYwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI0ZjBkODVkMjNjYTJlNjQ2YzgzNGJiZDE1YTJjOWEyZWVjMGExNDI0OTc5NWYzNDIyYWY1NmE1MGMzNzFjNWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Y_EpnNNrE7QQ6_yX19S43xbzK9H0-31KcUCZTP7Q-5c)
from kirimase.
Managed to resolve this, thank you!
from kirimase.
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)
- Init error if opt out Shadcn
- db:push script missing from drizzle and postgres configuration HOT 1
- Init fails, due to next.config not having the expected file extension.
- Bug: Edge Case - Next project not created and init command working.
- Lucia auth bug
- Middleware bug using clerk auth HOT 1
- [Feature Request] Made a fork with new stuff that I'll maintain HOT 2
- NPM - packages not installed / because drizzle fails to without --legacy-peer-deps HOT 4
- Installation of dependencies fails during kirimase init with drizzle HOT 1
- Would need to update Drizzle DB generate command HOT 1
- Conflicting peer dependency drizzle HOT 3
- kirimase init logs a dependecy conflict HOT 3
- [Feature Request] Add example of generated code HOT 4
- [Bug] Prisma mutations broken when generating tables owned by the user
- [Bug] Init fail on existing project with prisma schema in multiple files (from Prisma 5.15.0)
- Dependency issue lucia HOT 1
- Missing Pool import
- Getting "NodeAPIQueryEngineLibrary.dmmf is not a function" when npm run db:generate HOT 2
- [Feature Request] Auto Form with Zod
- [Bug] Missing db:push script
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kirimase.