You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fs.js:965
binding.stat(pathModule.toNamespacedPath(path));
^
Error: ENOENT: no such file or directory, stat '/Users/jameshessin/local/websites/com.grillbrickstudios/node_modules/require-context/src'
at Object.fs.statSync (fs.js:965:11)
at Object.files (/Users/jameshessin/local/websites/com.grillbrickstudios/node_modules/node-dir/lib/paths.js:161:21)
at module.exports (/Users/jameshessin/local/websites/com.grillbrickstudios/node_modules/require-context/index.js:17:6)
at Object.<anonymous> (/Users/jameshessin/local/websites/com.grillbrickstudios/test/index.js:4:22)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at /Users/jameshessin/.config/yarn/global/node_modules/mocha/lib/mocha.js:231:27
at Array.forEach (<anonymous>:null:null)
at Mocha.loadFiles (/Users/jameshessin/.config/yarn/global/node_modules/mocha/lib/mocha.js:228:14)
at Mocha.run (/Users/jameshessin/.config/yarn/global/node_modules/mocha/lib/mocha.js:536:10)
at Object.<anonymous> (/Users/jameshessin/.config/yarn/global/node_modules/mocha/bin/_mocha:582:18)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
at startup (internal/bootstrap/node.js:201:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)
I am using the latest version:
node: 9.11.1
npm: 5.6.0
yarn: 1.5.1
macOS: 10.13.4
The text was updated successfully, but these errors were encountered:
Okay so the issue is that the context is looking in the require-context folder instead of my project root. I was able to get it working by changing the call to: requireContext('../../src', true, /\.test\.coffee$/) (Noticed I forgot to escape the . before which could be problematic).
This behavior seems counter-intuitive at best and a major bug at worst.
This is what I'm trying to do.
loading this into mocha to find tests:
This is the error I get:
I am using the latest version:
node: 9.11.1
npm: 5.6.0
yarn: 1.5.1
macOS: 10.13.4
The text was updated successfully, but these errors were encountered: