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

Error in /var/www/node/node_modules/drafter.js/lib/drafter.nomem.js:1 #374

Open
le-viet-anh-0001 opened this issue Nov 9, 2023 · 2 comments

Comments

@le-viet-anh-0001
Copy link

le-viet-anh-0001 commented Nov 9, 2023

Our server crashes periodically everyday, every hour, and this is the log right before a crash:

((function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.drafter=f()}}))((function(){var module;var Module;if(!Module){Module={}}Module["ready"]=false;Module["log"]=(function(text){console.log("drafter.js: "+text)});Module["logErr"]=(function(text){console.error("drafter.js: "+text)});Module["onRuntimeInitialized"]=(function(){this.ready=true});var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["ENVIRONMENT"]==="WEB"){ENVIRONMENT_IS_WEB=true}else if(Module["ENVIRONMENT"]==="WORKER"){ENVIRONMENT_IS_WORKER=true}else if(Module["ENVIRONMENT"]==="NODE"){ENVIRONMENT_IS_NODE=true}else if(Module["ENVIRONMENT"]==="SHELL"){ENVIRONMENT_IS_SHELL=true}else{throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.")}}else{ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof 

We really do not know what the cause is. Any suggestions would be appreciated!

@mitchellwarr
Copy link

Try adding this to your package.json. This fixed it for me

{
  "overrides": {
    "api-spec-converter": {
      "drafter.js": "3.2.0"
    }
  }
}

@mitchellwarr
Copy link

If this works for you too, then I think this package needs to have its dependancies updated

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