nexe express4 Error: ENOENT, no such file or directory '\types\mime.types'
See original GitHub issueseems 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.
Issue Analytics
- State:
- Created 8 years ago
- Comments:17 (12 by maintainers)
Top Results From Across the Web
node.js - NodeJS NEXE bundle error - Stack Overflow
I was trying to use NEXE to bundle my express 4 project. ... Error: ENOENT, no such file or directory '..../release/types/mime.types'.
Read more >Error: ENOENT: no such file or directory, scandir ... - YouTube
nodejsError: ENOENT : no such file or directory, scandir '**/node_modules/node-sass/vendor' | Module build failed (from .
Read more >express error: enoent: no such file or directory, stat - You.com
To answer the question in the comments : In Express 4.x, the sendfile method was replaced by the sendFile method (all lowercase ->...
Read more >mime-types - npm
The ultimate javascript content-type utility. Similar to the mime@1.x module, except: No fallbacks. Instead of naively returning the first ...
Read more >tt - Energiepass-hst
Source. Installation. npm install --save @types/mime-types. ... L' Internet Assigned. nexe express4 Error: ENOENT, no such file or directory ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Will do in the A.M. since my brain has stopped working today. 😃
Hmm Odd, Can you open a new issue with more information?
Closing this as express has been updated to have statically analyzable require statements