#!/usr/bin/env node
const path = require('path')
const fs = require('fs')

const SCRIPT_API_PATH = './node_modules/runjs/lib/script.js'

try {
  fs.accessSync(path.resolve(SCRIPT_API_PATH))
} catch (error) {
  console.error('RunJS not found. Do "npm install runjs --save-dev" or "yarn add --dev runjs" first.')
  process.exit(1)
}

const script = require(path.resolve(SCRIPT_API_PATH))
script.main()

@@ -379,16 +379,210 @@
 _PATH))%0A
+%0Aif (!script.main) %7B%0A  console.error('Version of runjs inside your project seems to be not compatible with global run script.')%0A  console.error('Do update to runjs %3E= 4.0')%0A  process.exit(1)%0A%7D%0A%0A
 script.m

Add incompatibility message to run script