BrianSipple / ember-cli-svgstore

Ember addon to combine SVGs as symbols in a spritesheet.
MIT License
20 stars 8 forks source link

Cannot set property '_directoryPath' of undefined #18

Closed denchen closed 7 years ago

denchen commented 7 years ago

I frequently do a fresh ynpm install of my app, and sometime in the past couple days, my Ember build has broken with:

% ember build
⠋ BuildingCannot set property '_directoryPath' of undefined
TypeError: Cannot set property '_directoryPath' of undefined
    at Directory (/Users/denchen/git/my-app/node_modules/broccoli-source/index.js:6:23)
    at UnwatchedDir (/Users/denchen/git/my-app/node_modules/broccoli-source/index.js:65:13)
    at Array.map (native)
    at Class._makeSourceTree (/Users/denchen/git/my-app/node_modules/ember-cli-svgstore/index.js:66:49)
    at Class.<anonymous> (/Users/denchen/git/my-app/node_modules/ember-cli-svgstore/index.js:58:32)
    at Array.map (native)
    at Class._makeSvgTrees (/Users/denchen/git/my-app/node_modules/ember-cli-svgstore/index.js:57:29)
    at Class.treeForPublic (/Users/denchen/git/my-app/node_modules/ember-cli-svgstore/index.js:20:22)
    at Class._treeFor (/Users/denchen/git/my-app/node_modules/ember-cli/lib/models/addon.js:534:33)
    at Class.treeFor (/Users/denchen/git/my-app/node_modules/ember-cli/lib/models/addon.js:494:21)

The line in question is in broccoli-source/index.js:

  this._directoryPath = directoryPath

Possibly relevant packages:

    "broccoli-asset-rev": "^2.4.5",
    "ember-cli": "~2.12.3",
    "ember-cli-app-version": "^2.0.0",
    "ember-cli-babel": "^5.1.7",
    "ember-cli-dependency-checker": "^1.3.0",
    "ember-cli-htmlbars": "^1.1.1",
    "ember-cli-htmlbars-inline-precompile": "^0.3.6",
    "ember-cli-inject-live-reload": "^1.4.1",
    "ember-cli-shims": "^1.0.2",
    "ember-cli-sri": "^2.1.0",
    "ember-cli-svgstore": "0.4.0",
    "ember-cli-uglify": "^1.2.0",
    "ember-component-css": "^0.3.2",
    "ember-composable-helpers": "^2.0.1",
    "ember-data": "^2.12.0",
    "ember-export-application-global": "^1.0.5",
    "ember-load-initializers": "^0.6.0",
    "ember-resolver": "^2.0.3",
    "ember-source": "~2.12.0",
    "loader.js": "^4.2.3"

I'm not sure if ember-cli-svgstore is the actual cause of this since there hasn't been a new version of this package in sometime. But I'm not sure how to further debug the root issue. Again, I tend to reinstall my app on a regular basis, and this only started happening in the past couple days or so. I know for a fact my last reinstall as early as this past Monday worked just fine.

alechirsch commented 7 years ago

@denchen See #17, feel free to point to my repo until this is merged.

BrianSipple commented 7 years ago

@alechirsch Just merged #17 -- thanks!

Feel free to give 0.4.1 a shot.

(cc @denchen)