canvas-sketch icon indicating copy to clipboard operation
canvas-sketch copied to clipboard

Issue creating file sketch-01.js

Open Chomasteiger opened this issue 1 year ago • 4 comments

When I install canvas I have this message: image

And then when I try to create the file "sketch-01.js" nothing happens, not even a message and If I go to the foulder, there is nothing inside. image

Chomasteiger avatar Feb 01 '23 21:02 Chomasteiger

@Chomasteiger I don't know what's causing the issue, but I can list some suggestions left by other users on what worked for them:

@alyona_furia wrote: "I used powershell as an admin and created a directory on C/users/etc and it worked."

@andresdeinnocentiis wrote: "in my case it was my antivirus who didn't allow the connection, but didn't show any warning. I don't know how I ended up trying disabling it, but it worked."

@bnecov wrote: "What worked for me was running the commands through VS Code`s terminal (also the solution suggested here)

brunoimbrizi avatar Feb 02 '23 09:02 brunoimbrizi

I tried everything, I disable the antivirus and nothing happened, I used the app as an admin and also with the C directory and nothing. I dont know that much about this apps so I didnt tried with VS Code, I dont know even how to use it. What I tried is to use StackBlitz but when I copy the code it seems like its not working: image

Chomasteiger avatar Feb 02 '23 20:02 Chomasteiger

Hi @Chomasteiger, I ran into your issue with Git Bash recently. As advised in the documentation, you can use "npx canvas-sketch-cli your_file_name.js --new --open" instead. I tested it in Git Bash and it worked fine.

Let me know if it helped.

Cheers from Belgium, Raphaël.

raphaelrockus avatar Feb 05 '23 16:02 raphaelrockus

Hello, I also had this issue and was able to fix it by doing what @alyona_furia wrote: "I used powershell as an admin and created a directory on C/users/etc and it worked." and then when I ran canvas-sketch sketch-01.js --new I got this error

"cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170."

so then I put this Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine which I found on https://stackoverflow.com/questions/54776324/powershell-bug-execution-of-scripts-is-disabled-on-this-system and that fixed the issue for me. I hope this helps.

anakaren97 avatar Feb 09 '23 06:02 anakaren97