Code Monkey home page Code Monkey logo

Comments (8)

gabeabrams avatar gabeabrams commented on August 20, 2024

Perhaps not super helpful, but a good place to start: what are the permissions for the folder you're working in? Perhaps this issue has to do with the current user not being able to create folders?

I'd try checking the folder permissions and also maybe try running the command with sudo.

from caccl.

renaatdemuynck avatar renaatdemuynck commented on August 20, 2024

Hi, thanks for the quick reply.
I tried the command with sudo but I got this:

$ sudo npm init caccl
bash: sudo: command not found

After some googling, I ran VSCode as administrator and tried again but with the same result

from caccl.

renaatdemuynck avatar renaatdemuynck commented on August 20, 2024

PS: I forgot to add the first lines of the error: The syntax of the command is incorrect.
I updated my original post.

from caccl.

renaatdemuynck avatar renaatdemuynck commented on August 20, 2024

I figured it out!
While examining the stack trace, I found these lines of code in create-caccl/lib/index.js:

198    exec('mkdir server');
199    exec('cd server && npm init -y');
200 -> exec('mkdir server/src');
201    exec('cd server && npm i --save-dev cross-env nodemon @types/express @types/express-session');

When I change line 200 to:

198    exec('mkdir server');
199    exec('cd server && npm init -y');
200 -> exec('cd server && mkdir src');
201    exec('cd server && npm i --save-dev cross-env nodemon @types/express @types/express-session');

... it worked and the command finished succesfully!

from caccl.

renaatdemuynck avatar renaatdemuynck commented on August 20, 2024

mkdir --parents server/src (or mkdir -p server/src) would probably work too.

EDIT:
This also gives an error:

The syntax of the command is incorrect.
...
Error: Command failed: mkdir -p server/src

from caccl.

renaatdemuynck avatar renaatdemuynck commented on August 20, 2024

I created a pull request

from caccl.

renaatdemuynck avatar renaatdemuynck commented on August 20, 2024

Just realized I posted this in the wrong repo 😨

from caccl.

gabeabrams avatar gabeabrams commented on August 20, 2024

@renaatdemuynck thank you for submitting the PR! I appreciate your work on this :)

I've merged and re-published the create-caccl project (now v2.1.0) so you can use the npm init caccl command in the future. Sometimes, due to caching, you might still get an older version. If you're getting an older version, you could try clear your npm cache or use npm init caccl@latest.

Take care! Thank you again.

from caccl.

Related Issues (17)

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.