Git Product home page Git Product logo

enmap's Introduction

Evie's Github

eslachance github profile views Discord server Patreon

Hello my darlings and welcome to Evie.Code's Github Profile! You're here because you're curious about who I am and what I do - or maybe you're a potential employer and you're sleuthing through my stuff and figuring out if I can write good code? Either way, hello and thanks for visiting.

So, what is there to see here? Well, there's my super cool projects like Enmap and Josh that I'm currently working on. Enmap is feature-complete while Josh is more of a work in progress, a different implementation with features I can't do with Enmap. Also take a look at Snowflake which is a blogging platform made with React, Zustand, react-router-dom and Snowpack.

In the past, I've worked a lot on Discord bots using the Discord.js library to interact with the API itself. It's how I learned to extend my existing Javascript knowledge into the ES6+ era by creating bots like Etiket as well as the now defunct Komada framework and boilerplates like Guidebot. I also contributed most of An Idiot's Guide and created videos on my youtube channel over the years.

Want to chat me up? Join My Discord! You can also get me on Twitter and Facebook but to be honest, I don't usually check those regularly.

Wanna hire me? Connect on LinkedIn now!

Github Stats

Provided by GitHub Readme Stats

enmap's People

Contributors

almeidx avatar austr1an avatar bdistin avatar bibliofile avatar chicken avatar clemens-e avatar csprance avatar dan-online avatar dependabot[bot] avatar detroitwhiskey136 avatar eslachance avatar fahimfaisaal avatar joelnedev avatar jsproj avatar plasmachicken avatar realshadownova avatar strangegirlmurph avatar strenkml avatar thetayloredman avatar tjreigh avatar tjrgg avatar wilsonthewolf avatar yorkaargh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

enmap's Issues

TS issue

There is an issue in typescript when you specify the dataDir option it shows you an error that the directory doesn't exist

gyp ERR! stack Error: `make` failed with exit code: 2

Hello! I'm using repl.it for my music bot, but I get this error while installing enmap.

make: Entering directory '/home/runner/Firefly/node_modules/better-sqlite3/build'
  TOUCH b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
  ACTION deps_sqlite3_gyp_locate_sqlite3_target_extract_sqlite3 b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
  TOUCH Release/obj.target/deps/locate_sqlite3.stamp
  CC(target) Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o
cc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.
deps/sqlite3.target.mk:183: recipe for target 'Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o' failed
make: *** [Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o] Error 4
rm b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
make: Leaving directory '/home/runner/Firefly/node_modules/better-sqlite3/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/runner/.nvm/versions/node/v13.8.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:321:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 5.4.0-1019-gcp
gyp ERR! command "/home/runner/.nvm/versions/node/v13.8.0/bin/node" "/home/runner/.nvm/versions/node/v13.8.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /home/runner/Firefly/node_modules/better-sqlite3
gyp ERR! node -v v13.8.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build-release: `node-gyp rebuild --release`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build-release script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2021-04-03T11_01_39_471Z-debug.log
[            ......] - install: info lifecycle [email protected]~install:[            ......] \ install: info lifecycle [email protected]~install:[            ......] \ install: info lifecycle [email protected]~install:[            ......] \ install: info lifecycle [email protected]~install:[            ......] \ install: info lifecycle [email protected]~install:[            ......] \ install: info lifecycle [email protected]~install:[            ......] \ install: info lifecycle [email protected]~install:npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || npm run build-release`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2021-04-03T11_01_42_049Z-debug.log

issue with enmap-mongo

Hey, was working on a discord bot and saw that i was way out of date on enmap (being at 2.0.4 and the latest being 4.0.12) I updated called it a night and went to sleep. but it wasnt fetching and data from my mongo db and was very confused, downgrading back to 2.0.4 fixed it and was wondering if there was any internal changes that may have screwed with enmap-mongo?

Is there a limit on enmaps?

I have an issue where any new Enmaps i add just do not persist.

I have about 12 or 13 that work no problem.

They all follow this format.
client.settings = new Enmap({ provider: new EnmapLevel({ name: 'settings' }) });

however I have tried adding a few new ones, up to 16 now and the last 3 just do not persist.

I have tried awaiting the set(), I have tried closing them after saving, and now I am at a loss.

I use the exact same method to retrieve and save for all of them and the first 13 work no problem, So i am sure my code is right.

Any more I add just do not save. My only reasoning is that maybe i have hit some internal limit on the amount of enmaps i am allowed to have in one project due to a memory limit or something?

I did try to use multi but i just get multi does not exist.

Any help would be appreciated.
Thanks.

TypeError: data.findIndex is not a function

Hey, i have find a bug on Enmap !
The error is:

TypeError: data.findIndex is not a function
    at Enmap.remove (Z:\code\kady\kadyBeta\node_modules\enmap\src\index.js:837:24)
    at eval (eval at <anonymous> (Z:\code\kady\kadyBeta\_interactions\cmd\dev\eval.js:25:23), <anonymous>:1:39)
    at Z:\code\kady\kadyBeta\_interactions\cmd\dev\eval.js:25:23
    at new Promise (<anonymous>)
    at Command.exec (Z:\code\kady\kadyBeta\_interactions\cmd\dev\eval.js:21:15)
    at CommandManager.execute (Z:\code\kady\kadyBeta\_core\_managers\CommandManager.js:84:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async commandHandler (Z:\code\kady\kadyBeta\_listeners\nop\messageCreate.js:54:2) {
  [stack]: 'TypeError: data.findIndex is not a function\n' +
    '    at Enmap.remove (Z:\\code\\kady\\kadyBeta\\node_modules\\enmap\\src\\index.js:837:24)\n' +
    '    at eval (eval at <anonymous> (Z:\\code\\kady\\kadyBeta\\_interactions\\cmd\\dev\\eval.js:25:23), <anonymous>:1:39)\n' +
    '    at Z:\\code\\kady\\kadyBeta\\_interactions\\cmd\\dev\\eval.js:25:23\n' +
    '    at new Promise (<anonymous>)\n' +
    '    at Command.exec (Z:\\code\\kady\\kadyBeta\\_interactions\\cmd\\dev\\eval.js:21:15)\n' +
    '    at CommandManager.execute (Z:\\code\\kady\\kadyBeta\\_core\\_managers\\CommandManager.js:84:27)\n' +
    '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
    '    at async commandHandler (Z:\\code\\kady\\kadyBeta\\_listeners\\nop\\messageCreate.js:54:2)',
  [message]: 'data.findIndex is not a function'
}

The error occurred when I tried to push a string into an object.

ensure() telling me to ensure()?

Hi, I just want to preface this with a short message saying that I am by no means a great "coder"/programmer whatever you want to call it. I know how to do this the long way, but I'm just curious as to why what I'm doing is wrong. Anyways, I'm getting an error that says "(node:18899) UnhandledPromiseRejectionWarning: EnmapPathError: The property "balance" in key "353782817777385472" does not exist. Please set() it or ensure() it." and it also tells me it originates from line 75, which reads the following: "bot.playerstorage.ensure(message.author.id, 0, "balance")" There is already one key/value in the enmap when this fails, which was { warnings: 1 }. I used to do it like this "bot.playerstorage.ensure(message.author.id, {balance:0})" but when I added warnings, it obviously didn't put this value in, which would break the bot later on. I'm just wondering what I was doing wrong or how I can fix it without doing it the long way. Thanks!

help

/home/runner/XGiveaway-Bot/node_modules/enmap/src/index.js:120
this.#name = options.name ?? '::memory::';
^

SyntaxError: Unexpected token '?'
Hint: hit control+c anytime to ent

Can't add new data in the database once already created the database?

Hi,

I am trying to add more data to the database after I already made it, and want the default value to be in every player's data.

db.ensure(key, {

            money: 0,

            level: 0,

            inv: [],

            items: [],

            health: 100


        })

The data of money through items were the initial data I was keeping track of, but now I want to add health as well. When I add health in the data doesn't go into the player's database when db.ensure is called.

MaxListenersExceededWarning when loading too many enmaps

When loading too many enmaps it'll throw an MaxListenersExceededWarning warning - probably prefer to add all enmaps to an array, add one listener and once its emitted loop throw the array and close the dbs?

Stacktrace:

(Use `node --trace-warnings ...` to show where the warning was created)
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit
    at _addListener (node:events:595:17)
    at process.addListener (node:events:617:10)
    at new Enmap (/home/container/node_modules/enmap/src/index.js:231:13)```

Errors when attempting use of enmap

I get these errors when using enmap:

/root/Development/Bots/node_modules/enmap/src/index.js:84
  async fetch(keyOrKeys) {
        ^^^^^

SyntaxError: Unexpected identifier
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/root/Development/Bots/node_modules/enmap/index.js:1:77)

enmap.remove() erroring

When I try to use enmap.remove() I just get this error.

5|Mythonia-Bot  | TypeError: index.indexOf is not a function
5|Mythonia-Bot  |     at Map.remove (/home/minecraft/servers/Mythonia-Bot-V4/node_modules/enmap/src/index.js:721:34)
5|Mythonia-Bot  |     at Object.run (/home/minecraft/servers/Mythonia-Bot-V4/commands/blacklist.js:44:26)
5|Mythonia-Bot  |     at processTicksAndRejections (internal/process/task_queues.js:97:5)

JSON.parse() during loading causes issues with number strings and boolean strings

During init, the following lines are an issue:

        try {
          this.set(key, JSON.parse(value));
        } catch (error) {
          this.set(key, value);
        }
      });

The issue comes with certain string values. Such as: "365500091735474177" and "true". The first is badly evaluated to 365500091735474200 (because fuck 64-bit integers right?) and the boolean value true. Code relying on the strings can fail due to this.

Must replace with a check for [ and { which will json.parse, otherwise load as-is.

I can't install the enmap package

While installing enmap i get problems like:
npm ERR! prebuild-install warn install No prebuilt binaries found (target=17.9.1 runtime=node arch=x64 libc= platform=win32)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.10 found at "C:\Users\USER\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8

Help

"Game1": {
"Players": ["Shadow", "Psyko"],
"PlayerCount": 2
}

How to set that ? and replace Game1 with a real id ?

Thanks for help πŸ‘

Enmap.find(func) errors while it shouldnt

A week ago changes were made to Enmap.find(), which enforces a string as second argument - but according to typings/docs, when supplying a function as first parameter, the second parameter is optional:

* @param {*} [value] The expected value - only applicable and required if using a property for the first argument. Can't be nil.

It seems like this exception wasn't implemented .-.

enmap/src/index.js

Lines 1352 to 1353 in 45df42d

if (isNil(value)) throw new Err(
'The value must be specified and cannot be nil.',

Docs still have a function as example without using a second parameter. Workaround would be to supply a non-nil string as second parameter.

npm errors when installing

Whenever I'm trying to install enmap through npm (npm i enmap), I keep getting the following error:

npm ERR! Command failed: /usr/bin/git checkout partytime
npm ERR! error: pathspec 'partytime' did not match any file(s) known to git.
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2017-10-20T10_37_34_900Z-debug.log

And the debug log: 2017-10-20T10_37_34_900Z-debug.log

Any way to solve this?
Cheers!

Update better-sqlite3 dependency.

If you are the latest version of node and enmap, you may find this error when running the project:

Error: The module '/.../node_modules/enmap/node_modules/better-sqlite3/build/Release/better_sqlite3.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 120. This version of Node.js requires NODE_MODULE_VERSION 115. Please try re-compiling or re-installing the module (for instance, using npm rebuildornpm install). at Module._extensions..node (node:internal/modules/cjs/loader:1473:18) at Module.load (node:internal/modules/cjs/loader:1207:32) at Module._load (node:internal/modules/cjs/loader:1023:12) at Module.require (node:internal/modules/cjs/loader:1235:19) at require (node:internal/modules/helpers:176:18) at bindings (/Users/lgnunes/Projetos/torenzala-bot/node_modules/bindings/bindings.js:112:48) at new Database (/Users/lgnunes/Projetos/torenzala-bot/node_modules/enmap/node_modules/better-sqlite3/lib/database.js:48:64) at new Enmap (/Users/lgnunes/Projetos/torenzala-bot/node_modules/enmap/src/index.js:156:18) at Object.<anonymous> (/Users/lgnunes/Projetos/torenzala-bot/index.js:11:19) at Module._compile (node:internal/modules/cjs/loader:1376:14) { code: 'ERR_DLOPEN_FAILED'

Typings

Any chance to add in a typings file?

Enmap per-server settings for Discord not saving

I followed the guide on how to create per-server configs with enmap, and I can successfully edit, view and reset the keys and their respective values for each server, however when I restart my bot, all the changed revert and the values return to their original value. How can I fix this?

Bun SQLite implementation support

With the recent release of Bun v1.0, more people might be using bun over node. Bun has a native implementation of SQLite, which they claim is 3-6x faster than better-sqlite-3.

The API of the native module is inspired by better-sqlite-3, so it might be very easy to add support for it too.
(Haven't looked at exactly what is used in enmap and how the actually easy it would be to add it)

Bun support shouldn't interfere with existing node users and should only complement anyone using bun.
(It should check if the process is running on bun and use the native implementation and there should also be an option to force it to run on better-sqlite-3.)

"key was type of "object"" error when using enmap.push()

As the title says.
My enmap structure:
694554379243618315: { 713536199536541757: {} }

The code:
bot.emojiMessages.push(message.guild.id, {"foo": "bar"}, "713536199536541757")

If there is another way to add item to object please let me know.

Enmap won't install on M1 MacBook Air

npm ERR! code 1
npm ERR! path /Users/redacted/discord-bots/Discord Bots/ArgonBots/ADMINBOTS/node_modules/better-sqlite3
npm ERR! command failed
npm ERR! command sh -c prebuild-install || npm run build-release
npm ERR! > [email protected] build-release
npm ERR! > node-gyp rebuild --release
npm ERR! 
npm ERR!   TOUCH b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
npm ERR!   ACTION deps_sqlite3_gyp_locate_sqlite3_target_extract_sqlite3 b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
npm ERR! rm b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
npm ERR! prebuild-install WARN install No prebuilt binaries found (target=16.13.0 runtime=node arch=arm64 libc= platform=darwin)
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.7 found at "/opt/homebrew/opt/[email protected]/bin/python3.9"
npm ERR! gyp info spawn /opt/homebrew/opt/[email protected]/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/redacted/.nvm/versions/node/v16.13.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/redacted/discord-bots/Discord Bots/ArgonBots/ADMINBOTS/node_modules/better-sqlite3/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/redacted/.nvm/versions/node/v16.13.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/redacted/Library/Caches/node-gyp/16.13.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/redacted/Library/Caches/node-gyp/16.13.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/redacted/.nvm/versions/node/v16.13.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/redacted/Library/Caches/node-gyp/16.13.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/redacted/discord-bots/Discord Bots/ArgonBots/ADMINBOTS/node_modules/better-sqlite3',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! /bin/sh: Bots/ArgonBots/ADMINBOTS/node_modules/better-sqlite3/build/Release/lib.host:/Users/redacted/discord-bots/Discord: No such file or directory
npm ERR! /Users/redacted/discord-bots/Discord Bots/ArgonBots/ADMINBOTS/node_modules/better-sqlite3/deps/extract.js:8
npm ERR! process.on('unhandledRejection', (err) => { throw err; });
npm ERR!                                             ^
npm ERR! 
npm ERR! CwdError: ENOENT: Cannot cd into '/Users/redacted/discord-bots/Discord Bots/ArgonBots/ADMINBOTS/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3'
npm ERR!     at /Users/redacted/discord-bots/Discord Bots/ArgonBots/ADMINBOTS/node_modules/tar/lib/mkdir.js:43:12
npm ERR!     at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR!   path: '/Users/redacted/discord-bots/Discord Bots/ArgonBots/ADMINBOTS/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3',
npm ERR!   code: 'ENOENT'
npm ERR! }
npm ERR! make: *** [b857c92884e9598d609f6be182a2595df7a8e00f.intermediate] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/Users/redacted/.nvm/versions/node/v16.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 21.1.0
npm ERR! gyp ERR! command "/Users/redacted/.nvm/versions/node/v16.13.0/bin/node" "/Users/redacted/.nvm/versions/node/v16.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
npm ERR! gyp ERR! cwd /Users/redacted/discord-bots/Discord Bots/ArgonBots/ADMINBOTS/node_modules/better-sqlite3
npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v8.2.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/redacted/.npm/_logs/2021-11-08T22_39_09_326Z-debug.log

Cen't delete the hole database

When i do woorden.deleteAll() it's giving this error:

        this.db.bulkDelete();
                ^

TypeError: this.db.bulkDelete is not a function
    at Map.deleteAll (C:\Users\Paul\node_modules\enmap\src\index.js:433:17)
    at Client.bot.on.message (C:\Users\Paul\Desktop\discord bots\school\bot.js:142:13)
    at emitOne (events.js:115:13)
    at Client.emit (events.js:210:7)
    at MessageCreateHandler.handle (C:\Users\Paul\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
    at WebSocketPacketManager.handle (C:\Users\Paul\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
    at WebSocketConnection.onPacket (C:\Users\Paul\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:333:35)
    at WebSocketConnection.onMessage (C:\Users\Paul\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:296:17)
    at WebSocket.onMessage (C:\Users\Paul\node_modules\discord.js\node_modules\ws\lib\event-target.js:120:16)
    at emitOne (events.js:115:13)```

String only keys

In regards to #104 and its ultimate reversion, the decision should be made on whether to make key, string only, or perhaps string | null, in order to provide a non-breaking version.

This will require the following

  • Discussion on the choice
  • Reopening #104
  • Increasing test coverage
  • Releasing a patch version

cc: @StrangeGirlMurph

Error when starting enmap.

node_modules/enmap/src/index.js:260
static async migrate() {
^^^^^^^

SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object. (/var/www/web/nodejs/BotBeta/node_modules/enmap/index.js:1:77)

update type definition missing

Not sure if this is by design but the update methods type definition is not present in the typings/index.d.ts file nor is it mentioned in the docs.

Error at index.js:55

2017-11-11 19_25_59-c__windows_system32_cmd exe
The following error happens whenever I try to boot my bot using discord.js - It's using enmap for an RPG system.

Enmap with typescript

Hi

I started with refactoring of my discord bot from js to typescript.
How can i use enmap with it?
It tells that value are not exists and doesn't allow me to use it as before

Error: Could not locate the bindings file. Tried:

Hello! When I try to start my node app it says Error: Could not locate the bindings file. Tried: and I cant fix it! Please help!

Console:

$ node .
D:\Bots\enmaptest\node_modules\leveldown\node_modules\bindings\bindings.js:91
  throw err
  ^

Error: Could not locate the bindings file. Tried:
 β†’ D:\Bots\enmaptest\node_modules\leveldown\build\leveldown.node
 β†’ D:\Bots\enmaptest\node_modules\leveldown\build\Debug\leveldown.node
 β†’ D:\Bots\enmaptest\node_modules\leveldown\build\Release\leveldown.node
 β†’ D:\Bots\enmaptest\node_modules\leveldown\out\Debug\leveldown.node
 β†’ D:\Bots\enmaptest\node_modules\leveldown\Debug\leveldown.node
 β†’ D:\Bots\enmaptest\node_modules\leveldown\out\Release\leveldown.node
 β†’ D:\Bots\enmaptest\node_modules\leveldown\Release\leveldown.node
 β†’ D:\Bots\enmaptest\node_modules\leveldown\build\default\leveldown.node
 β†’ D:\Bots\enmaptest\node_modules\leveldown\compiled\14.10.1\win32\x64\leveldown.node
    at bindings (D:\Bots\enmaptest\node_modules\←[4mleveldown←[24m\node_modules\←[4mbindings←[24m\bindings.js:88:9)
    at Object.<anonymous> (D:\Bots\enmaptest\node_modules\←[4mleveldown←[24m\leveldown.js:4:46)
←[90m    at Module._compile (internal/modules/cjs/loader.js:1076:30)←[39m
←[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)←[39m
←[90m    at Module.load (internal/modules/cjs/loader.js:941:32)←[39m
←[90m    at Function.Module._load (internal/modules/cjs/loader.js:782:14)←[39m
←[90m    at Module.require (internal/modules/cjs/loader.js:965:19)←[39m
←[90m    at require (internal/modules/cjs/helpers.js:88:18)←[39m
    at Object.<anonymous> (D:\Bots\enmaptest\node_modules\←[4mlevel←[24m\level.js:1:44)
←[90m    at Module._compile (internal/modules/cjs/loader.js:1076:30)←[39m {
  tries: [
    ←[32m'D:\\Bots\\enmaptest\\node_modules\\leveldown\\build\\leveldown.node'←[39m,
    ←[32m'D:\\Bots\\enmaptest\\node_modules\\leveldown\\build\\Debug\\leveldown.node'←[39m,
    ←[32m'D:\\Bots\\enmaptest\\node_modules\\leveldown\\build\\Release\\leveldown.node'←[39m,
    ←[32m'D:\\Bots\\enmaptest\\node_modules\\leveldown\\out\\Debug\\leveldown.node'←[39m,
    ←[32m'D:\\Bots\\enmaptest\\node_modules\\leveldown\\Debug\\leveldown.node'←[39m,
    ←[32m'D:\\Bots\\enmaptest\\node_modules\\leveldown\\out\\Release\\leveldown.node'←[39m,
    ←[32m'D:\\Bots\\enmaptest\\node_modules\\leveldown\\Release\\leveldown.node'←[39m,
    ←[32m'D:\\Bots\\enmaptest\\node_modules\\leveldown\\build\\default\\leveldown.node'←[39m,
    ←[32m'D:\\Bots\\enmaptest\\node_modules\\leveldown\\compiled\\14.10.1\\win32\\x64\\leveldown.node'←[39m
  ]
}

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.