broccolijs / node-merge-trees

MIT License
4 stars 9 forks source link

mergeRelativePaths baseDir may be removed mid-build #3

Open stefanpenner opened 6 years ago

stefanpenner commented 6 years ago

https://github.com/broccolijs/node-merge-trees/blob/c8820703d3219b5226a8522cd6507b6403752232/index.js#L169

I believe if this is a subdirectory and that subdirectory is

stack:

 Error: ENOENT: no such file or directory, scandir '/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/tmp/broccoli_merge_trees-input_base_path-nLM33TfF.tmp/2/'
    at Object.fs.readdirSync (fs.js:904:18)
    at /Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/merge-trees/index.js:169:19
    at Array.map ()
    at MergeTrees._mergeRelativePath (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/merge-trees/index.js:167:28)
    at MergeTrees.merge (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/merge-trees/index.js:53:26)
    at BroccoliMergeTrees.build (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/broccoli-merge-trees/index.js:34:19)
    at /Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/broccoli-plugin/read_compat.js:93:34
    at tryCatch (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/rsvp/dist/rsvp.js:525:12)
    at invokeCallback (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/rsvp/dist/rsvp.js:538:13)
    at publish (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/rsvp/dist/rsvp.js:508:7)
    at flush (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/rsvp/dist/rsvp.js:2415:5)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

                Error: ENOENT: no such file or directory, scandir '/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/tmp/broccoli_merge_trees-input_base_path-nLM33TfF.tmp/2/'
    at Object.fs.readdirSync (fs.js:904:18)
    at /Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/merge-trees/index.js:169:19
    at Array.map ()
    at MergeTrees._mergeRelativePath (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/merge-trees/index.js:167:28)
    at MergeTrees.merge (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/merge-trees/index.js:53:26)
    at BroccoliMergeTrees.build (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/broccoli-merge-trees/index.js:34:19)
    at /Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/broccoli-plugin/read_compat.js:93:34
    at tryCatch (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/rsvp/dist/rsvp.js:525:12)
    at invokeCallback (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/rsvp/dist/rsvp.js:538:13)
    at publish (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/rsvp/dist/rsvp.js:508:7)
    at flush (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/rsvp/dist/rsvp.js:2415:5)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

The broccoli plugin was instantiated at: 
    at new Plugin (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/broccoli-plugin/index.js:7:31)
    at new BroccoliSassCompiler (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/broccoli-eyeglass/lib/broccoli_sass_compiler.js:216:5)
    at new EyeglassCompiler (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/broccoli-eyeglass/lib/index.js:59:5)
    at Object.toTree (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/index.js:116:16)
    at /Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/ember-cli-preprocess-registry/preprocessors.js:180:26
    at Array.forEach ()
    at processPlugins (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/ember-cli-preprocess-registry/preprocessors.js:178:11)
    at module.exports.preprocessCss (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/ember-cli-preprocess-registry/preprocessors.js:148:10)
    at EmberAddon.styles (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/ember-cli/lib/broccoli/ember-app.js:1436:32)
    at EmberAddon.toArray (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/ember-cli/lib/broccoli/ember-app.js:1786:12)
    at EmberAddon.toTree (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/ember-cli/lib/broccoli/ember-app.js:1809:32)
    at module.exports (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/ember-cli-build.js:19:14)
    at Builder.setupBroccoliBuilder (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/ember-cli/lib/models/builder.js:56:19)
    at new Builder (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/ember-cli/lib/models/builder.js:30:10)
    at ServeTask.run (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/ember-cli/lib/tasks/serve.js:24:55)
    at Promise.resolve.then (/Users/spenner/src/sass-eyeglass/ember-cli-eyeglass/node_modules/ember-cli/lib/models/command.js:243:46)

stefanpenner commented 6 years ago

Ah, after further investigation. This is the result of an inputTree being deleted. So most likely not an issue with node-merge-trees but likely a largely broccoli ergonomic issue we should explore improving.