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
TypeError: /Users/chris/Projects/illustrations/app/assets/javascripts/application.js: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.dirname (path.js:1324:5)
at resolve.sync (/Users/chris/.gem/ruby/2.3.1/gems/sprockets-commoner-0.2.6/js/babel-plugin-sprockets-commoner-internal/node_modules/browser-resolve/index.js:281:21)
at resolveTarget (/Users/chris/.gem/ruby/2.3.1/gems/sprockets-commoner-0.2.6/js/babel-plugin-sprockets-commoner-internal/index.js:124:26)
at PluginPass.VariableDeclarator (/Users/chris/.gem/ruby/2.3.1/gems/sprockets-commoner-0.2.6/js/babel-plugin-sprockets-commoner-internal/index.js:166:18)
at NodePath._call (/Users/chris/Projects/illustrations/node_modules/babel-traverse/lib/path/context.js:78:18)
at NodePath.call (/Users/chris/Projects/illustrations/node_modules/babel-traverse/lib/path/context.js:49:17)
at NodePath.visit (/Users/chris/Projects/illustrations/node_modules/babel-traverse/lib/path/context.js:108:12)
at TraversalContext.visitQueue (/Users/chris/Projects/illustrations/node_modules/babel-traverse/lib/context.js:174:16)
at TraversalContext.visitMultiple (/Users/chris/Projects/illustrations/node_modules/babel-traverse/lib/context.js:119:17)
at TraversalContext.visit (/Users/chris/Projects/illustrations/node_modules/babel-traverse/lib/context.js:217:19)
Hmm seems browser-resolve does a weird thing where it always calls dirname on filename, even if it doesn't use it and goes with basedir instead (look at line 231 in browser-resolve/index.js). I'll PR to browser-resolve
I'm not sure exactly why this is breaking on newer Node, but an example app with the following index file fails to compile with Node 6.2.0:
Fails with the following error (as an aside, I had to dive into the source code to expose the error stack, might be worth exposing that here: https://github.com/Shopify/schmooze/blob/master/lib/schmooze/processor_generator.rb#L18):
I can fix this by changing https://github.com/Shopify/sprockets-commoner/blob/master/js/babel-plugin-sprockets-commoner-internal/index.js#L124 to read:
This issue goes away in 5.7.0.
cc/ @bouk @dfmcphee
The text was updated successfully, but these errors were encountered: