felixge / felixge/node-sandboxed-module

Having trouble with new version

未关闭
#36 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
343
派生
41
PR 合并指标
30 天内没有已合并 PR

描述

I've always used 0.3.0 in the past, so maybe there's just some upgrade thing I'm missing, but using 1.0.1, some (at least) of my stubs are not working. I'm using this wrapper:

``` coffee
SandboxedModule = require('sandboxed-module')

global.requireSubject = (path, requires, globals) ->
console.log requires
SandboxedModule.require("./../../#{path}", {requires, globals})
```

This is in spec/helpers, so the path part isn't the problem (it does try to load the module), but then it throws `[Error: Cannot find module 'ftoggleDir/.ftoggle.config'] code: 'MODULE_NOT_FOUND'`, but the console.log in the code above is logging (amongst other things):

``` javascript
'ftoggleDir/.ftoggle.config':
{ environments: [ 'production' ],
configDir: 'config',
production: { path: 'ftoggle.json' } }
```

This is a json file, and I see that some of the recent improvements are around json files. I _have_ tried it also with `.json` on the end. Is there something else I need to do to get 1.0.1 working?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。