grimmdude / MidiWriterJS

♬ A JavaScript library which provides an API for programmatically generating and creating expressive multi-track MIDI files and JSON.
MIT License
547 stars 58 forks source link

Error: MidiWriter.Track() is not a constructor? #41

Closed KobaruAkiba closed 6 years ago

KobaruAkiba commented 6 years ago

Hi, I'm a programming rookie. As the title say, I get this error:

cattura cattura2

I get this error AFTER doing the npm install thing. This is the console result:

cattura3

Is it normal? I'm missing something but I don't know what.

Thank you for your help.

benrogmans commented 6 years ago

Check if you run the command in the right directory.

Npm cannot find the file package.json which is required for any npm project.

If you are in the right directory but you havn’t initialised your project as an NPM project yet, run:

npm init

KobaruAkiba commented 6 years ago

I've installed the npm in my project folder, the same warning appeared

cattura21

This is my project folder, am I missing the package.json? How I can get it?

cattura22

It's one of my first time using NMP, I'm not sure how to use the initializator correctly.

Thank you, for your help!

KobaruAkiba commented 6 years ago

I tried to change the project folder destination, the console report the same warnings:

cattura23

But the project folder now contains some new files:

cattura24

Anyhow, the result is not changed. I'm still getting the TypeError: MidiWriter.Track is not a constructor.

benrogmans commented 6 years ago

Run the command:

npm init

Op 7 jun. 2018 om 15:56 heeft IkobaNoOkami notifications@github.com het volgende geschreven:

I tried to change the project folder destination, the console report the same warnings:

But the project folder now contains some new files:

Anyhow, the result is not changed. I'm still getting the TypeError: MidiWriter.Track is not a constructor.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

KobaruAkiba commented 6 years ago

This showed up:

cattura31

Have I to fill the fields with specific informations?