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
1) options "before all" hook:
Cannot find module 'babel-runtime/' from '/Volumes/Macintosh_HD/Users/shauncutts/src/broccoli-babel-transpiler/node_modules/babel-code-frame/'
Error: Cannot find module 'babel-runtime/' from 'node_modules/babel-code-frame/'
at Function.module.exports (node_modules/resolve/lib/sync.js:33:11)
at resolvePkg (node_modules/hash-for-dep/lib/resolve-pkg.js:20:18)
at pkg (node_modules/hash-for-dep/lib/pkg.js:17:20)
at again (node_modules/hash-for-dep/lib/deps-for.js:19:22)
at node_modules/hash-for-dep/lib/deps-for.js:28:7
at Array.forEach (native)
at again (node_modules/hash-for-dep/lib/deps-for.js:27:55)
at node_modules/hash-for-dep/lib/deps-for.js:28:7
at Array.forEach (native)
at again (node_modules/hash-for-dep/lib/deps-for.js:27:55)
at node_modules/hash-for-dep/lib/deps-for.js:28:7
at Array.forEach (native)
at again (node_modules/hash-for-dep/lib/deps-for.js:27:55)
at depsFor (node_modules/hash-for-dep/lib/deps-for.js:30:4)
at statPathsFor (node_modules/hash-for-dep/lib/stat-paths-for.js:14:15)
at hashForDep (node_modules/hash-for-dep/index.js:15:21)
at Babel.Filter.cacheKey (node_modules/broccoli-persistent-filter/index.js:118:10)
at Object.module.exports.cacheKey (node_modules/broccoli-persistent-filter/lib/strategies/persistent.js:22:16)
at Object.module.exports.init (node_modules/broccoli-persistent-filter/lib/strategies/persistent.js:12:50)
at Processor.init (node_modules/broccoli-persistent-filter/lib/processor.js:16:18)
at Babel.Filter (node_modules/broccoli-persistent-filter/index.js:56:18)
at new Babel (index.js:34:10)
at Context.<anonymous> (test.js:38:13)
Drilling down, the problem is caused by babel-runtime not having a "main" key in its package.json. In "babel-code-frame/lib/index.js" we have:
var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"];
... so we shouldn't have to have the "main" key. This seems like a weakness in hash-for-dep depending on node-resolve which requires a "main" file. This seems to have nothing to do with babel-6 per se. I'll look into reporting and patching downstream (it would seem that resolve takes a filter... hash-for-dep is just using the "main" file to hash it and not actually load it, so we could insert a fake main if package.json is read but is missing "main").
I thought I'd report here in case someone who actually understands the code has a better idea. This seems like something that would break quite often actually, so I'm wondering if I'm overlooking something.
The text was updated successfully, but these errors were encountered:
I tried to fork and bump to babel-6
I got the following problem:
Drilling down, the problem is caused by babel-runtime not having a "main" key in its package.json. In "babel-code-frame/lib/index.js" we have:
... so we shouldn't have to have the "main" key. This seems like a weakness in hash-for-dep depending on node-resolve which requires a "main" file. This seems to have nothing to do with babel-6 per se. I'll look into reporting and patching downstream (it would seem that resolve takes a filter... hash-for-dep is just using the "main" file to hash it and not actually load it, so we could insert a fake main if package.json is read but is missing "main").
I thought I'd report here in case someone who actually understands the code has a better idea. This seems like something that would break quite often actually, so I'm wondering if I'm overlooking something.
The text was updated successfully, but these errors were encountered: