nexe: nexe express4 Error: ENOENT, no such file or directory '\types\mime.types'

seems there is a bug with nexe when including express4:

app.js

var express = require('express');
console.log('hello world');

package.json

{
  "name": "nexe_express_test",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node app.js"
  },
  "dependencies": {
    "express": "~4.10.8"
  },
  "nexe": {
    "input": "./app.js",
    "output": "app.exe",
    "temp": "src",
    "runtime": {
        "framework": "nodejs",
        "version": "0.12.7",
        "ignoreFlags": true
    }
  }
}

i did npm install nexe -g once and now just call nexe, relying on the package.json config, passing no command line arguments

nexe runs without errors but running the output executable gives me this error:

C:\Users\filipecruz\Documents\nexe_express_test>app.exe
fs.js:500
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory 'C:\Users\filipecruz\Documents\nexe_exp
ress_test\types\mime.types'
    at Error (native)
    at Object.fs.openSync (fs.js:500:18)
    at Object.fs.readFileSync (fs.js:352:15)
    at Mime.load (nexe.js:20643:20)
    at Array.call.C:\Users\filipecruz\Documents\nexe_express_test\node_modules\e
xpress\node_modules\send\node_modules\mime\mime.js.path (nexe.js:20679:6)
    at initModule (nexe.js:29:11)
    at nexe.js:31:64
    at Array.call.C:\Users\filipecruz\Documents\nexe_express_test\node_modules\e
xpress\node_modules\send\index.js.stream (nexe.js:16516:12)
    at initModule (nexe.js:29:11)
    at nexe.js:31:64

removing the express lines in package.json and app.js prints hello world just fine.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 17 (12 by maintainers)

Most upvoted comments

Will do in the A.M. since my brain has stopped working today. 😃