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

Compatible with Node 14? #285

Open
jcollum-nutrien opened this issue Apr 15, 2022 · 1 comment
Open

Compatible with Node 14? #285

jcollum-nutrien opened this issue Apr 15, 2022 · 1 comment

Comments

@jcollum-nutrien
Copy link

jcollum-nutrien commented Apr 15, 2022

✗ node --version
v14.19.1

I'm getting a SIGABRT when I use this library:

/Users/justin.collum2@nutrien.com/.nvm/versions/node/v14.19.1/bin/node[59358]: ../src/base_object-inl.h:184:static void node::BaseObject::InternalFieldSet(v8::Local<v8::String>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void> &) [Field = 2, typecheck = &v8::Value::IsFunction]: Assertion `((*value)->*typecheck)()' failed.
 1: 0x1013221f5 node::Abort() (.cold.1) [/Users/justin.collum2@nutrien.com/.nvm/versions/node/v14.19.1/bin/node]
 2: 0x1000b6399 node::Abort() [/Users/justin.collum2@nutrien.com/.nvm/versions/node/v14.19.1/bin/node]
 3: 0x1000b6201 node::Assert(node::AssertionInfo const&) [/Users/justin.collum2@nutrien.com/.nvm/versions/node/v14.19.1/bin/node]
 4: 0x10017170d void node::BaseObject::InternalFieldSet<2, &(v8::Value::IsFunction() const)>(v8::Local<v8::String>, v8::Local<v8::Value>, v8::PropertyCallbackInfo<void> const&) [/Users/justin.collum2@nutrien.com/.nvm/versions/node/v14.19.1/bin/node]
 5: 0x10046ab16 v8::internal::PropertyCallbackArguments::CallAccessorSetter(v8::internal::Handle<v8::internal::AccessorInfo>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>) [/Users/justin.collum2@nutrien.com/.nvm/versions/node/v14.19.1/bin/node]
 6: 0x1005e467a v8::internal::Object::SetPropertyWithAccessor(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::Maybe<v8::internal::ShouldThrow>) [/Users/justin.collum2@nutrien.com/.nvm/versions/node/v14.19.1/bin/node]
 7: 0x1005e9286 v8::internal::Object::SetPropertyInternal(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::Maybe<v8::internal::ShouldThrow>, v8::internal::StoreOrigin, bool*) [/Users/justin.collum2@nutrien.com/.nvm/versions/node/v14.19.1/bin/node]
 8: 0x1005e9066 v8::internal::Object::SetProperty(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::StoreOrigin, v8::Maybe<v8::internal::ShouldThrow>) [/Users/justin.collum2@nutrien.com/.nvm/versions/node/v14.19.1/bin/node]
 9: 0x100716ec9 v8::internal::Runtime::SetObjectProperty(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::StoreOrigin, v8::Maybe<v8::internal::ShouldThrow>) [/Users/justin.collum2@nutrien.com/.nvm/versions/node/v14.19.1/bin/node]
10: 0x10071a545 v8::internal::Runtime_SetKeyedProperty(int, unsigned long*, v8::internal::Isolate*) [/Users/justin.collum2@nutrien.com/.nvm/versions/node/v14.19.1/bin/node]
11: 0x100a8e7d9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/Users/justin.collum2@nutrien.com/.nvm/versions/node/v14.19.1/bin/node]
12: 0x100b04f59 Builtins_StaKeyedPropertyHandler [/Users/justin.collum2@nutrien.com/.nvm/versions/node/v14.19.1/bin/node]
error Command failed with signal "SIGABRT".

Anytime I hit the code that imports this library I get a crash.

Code:

import axios from 'axios';

import config from '../config';
import { getLogger } from './logger';
const logger = getLogger(__filename);

import NodeCache from 'node-cache';
const tokenCache = new NodeCache({
    stdTTL: 900, // 15 mins
    checkperiod: 60,
    deleteOnExpire: true,
});

const oauthTokenCacheKey = 'oauth-token';

...
@torressam333
Copy link

What version of node-cache are you on?

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