at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:405:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at ChordsController.index (/Users/J/Sites/hyperboria/app/Http/Controllers/ChordsController.js:14:30)
at next (native)
at /Users/J/Sites/hyperboria/node_modules/adonis-framework/src/Middleware/index.js:248:12`

我没有碰它或更新任何东西-我被难倒了。

原文：

Hi, this is strange and I'm not sure if it's an Adonis issue - but suddenly after not touching my app for a couple of days it's giving me an error when I require a script like so:

var chordgenerator = require("./chordgenerator");

This is in a controller, there is a "chordgenerator.js" file in Http/Controllers

the error is:

` SyntaxError: Invalid regular expression: missing /

at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:405:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at ChordsController.index (/Users/J/Sites/hyperboria/app/Http/Controllers/ChordsController.js:14:30)
at next (native)
at /Users/J/Sites/hyperboria/node_modules/adonis-framework/src/Middleware/index.js:248:12`

If I remove it it works, (except it breaks in different ways because I removed it) and I get that same error on another file I require in the same way, so I don't think the bug in the 'chordgenerator' file.

The files kind of look like this:

` module.exports = {
goforit:function(){
//blah blah long function

}
}`

Since I posted this I updated Node and Adonis to the newest stable versions and I'm still getting the error. And like I said, I didn't touch the damn thing, it was working two days ago and now it isn't. I'm thinking it's not an Adonis error, it looks like something in the Require module, maybe something auto-updated itself, I have no clue.