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

.gitignore missing during mucklet-script init #5

Closed
GreenReaper opened this issue Feb 8, 2025 · 3 comments
Closed

.gitignore missing during mucklet-script init #5

GreenReaper opened this issue Feb 8, 2025 · 3 comments

Comments

@GreenReaper
Copy link

GreenReaper commented Feb 8, 2025

I tried out npx mucklet-script init per the last release, only it seems unhappy...

Ensuring 'mucklet.config.js' exists...
  Created: C:\Users\GreenReaper\Desktop\cablecar\mucklet.config.js

Ensuring '.gitignore' exists...

ENOENT: no such file or directory, copyfile 'C:\Users\GreenReaper\AppData\Local\npm-cache\_npx\4706204c1f1313e1\node_modules\mucklet-script\.gitignore' -> 'C:\Users\GreenReaper\Desktop\cablecar\.gitignore'

I think maybe it's related to this issue and perhaps the package or repo needs an .npmignore too?

I'm on Windows 11 Pro x64 in case it matters. The npm run build step after that seems to work.

@anisus
Copy link
Contributor

anisus commented Feb 13, 2025

Ah, yes. I missed that file.

Yes, the issue is that .gitignore is not included when npm packs the package. But running it locally works well, since then I have the file right there!
I will fix it.

While you may get the error, since /.gitignore is the last file the script creates, the entire project should be created successfully.

Thanks for the help, @GreenReaper!

@anisus
Copy link
Contributor

anisus commented Feb 13, 2025

@GreenReaper , just adding that the only thing you missed out on (except the .gitignore not being created) was this text:

Done!

Don't forget to install dependencies before you start:

  npm install

To edit the example script file, open 'scripts/index.ts' in your editor of choice.
Create as many additional files as necessary and use them as imports.

To build the example script to check for compilation errors, run:

  npm run build

To deploy the script to a Mucklet realm, first open 'mucklet.config.js' and uncomment and edit:
    // apiUrl: "wss://api.test.mucklet.com",
and
    // room: "aaaaaaaaaaaaaaaaaaaa",

Get a Manager token (generated under Player Settings in realm) and then run:

  npm run deploy -- --token=mgr.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  The token can also be set in the MUCKLET_TOKEN environment variable.

To view the console logs from the script, run:

  npm run logs -- --token=mgr.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

More info can be found on the Mucklet script GitHub page:

  https://github.com/mucklet/mucklet-script

Enjoy scripting!

anisus added a commit that referenced this issue Feb 13, 2025
…ng-init

GH-5: Fixed bug causing error when trying to create .gitignore.
@anisus
Copy link
Contributor

anisus commented Feb 13, 2025

Resolved in PR #6

@anisus anisus closed this as completed Feb 13, 2025
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

2 participants