2

The error I get is,says can not read property '0' of null but not sure what it refers to..

$ ember build --prod
cleaning up...
Build failed.
File: assets/api.css
The Broccoli Plugin: [broccoli-persistent-filter:CleanCSSFilter] failed with:
TypeError: Cannot read property '0' of null
    at findNameRoot (/Users/hodaraadam/dev/Apps/api/node_modules/clean-css/lib/selectors/extractor.js:66:59)
    at extract (/Users/hodaraadam/dev/Apps/api/node_modules/clean-css/lib/selectors/extractor.js:36:9)
    at restructure (/Users/hodaraadam/dev/Apps/api/node_modules/clean-css/lib/selectors/restructure.js:297:22)
    at optimize (/Users/hodaraadam/dev/Apps/api/node_modules/clean-css/lib/selectors/advanced.js:71:5)
    at minify (/Users/hodaraadam/dev/Apps/api/node_modules/clean-css/lib/clean.js:228:5)
    at whenSourceMapReady (/Users/hodaraadam/dev/Apps/api/node_modules/clean-css/lib/clean.js:135:7)
    at /Users/hodaraadam/dev/Apps/api/node_modules/clean-css/lib/clean.js:155:14
    at CleanCssPromise.CleanCSS.minify (/Users/hodaraadam/dev/Apps/api/node_modules/clean-css/lib/clean.js:127:42)
    at promisify (/Users/hodaraadam/dev/Apps/api/node_modules/clean-css-promise/index.js:31:9)
    at CleanCssPromise.minify (/Users/hodaraadam/dev/Apps/api/node_modules/clean-css-promise/index.js:30:14)
AHH
  • 301
  • 1
  • 4
  • 13
  • 1
    Did you always see this error, or is it new? We had a similar (though different) error message today, which we traced to a recently released new version of a dependency (ember-cli in our case). Pinning dependencies to the older version helped fix our problem, because the app didn't need to be updated yet. Also, make sure any addons / modules you use have been provided the correct config options. But that would need more than a code snippet to diagnose. – abought May 02 '17 at 17:50
  • I think its a new error, its only a 3 weeks old app I am developing so not 100% sure but what is the ember-cli version you are using that solved the issue? thnx – AHH May 02 '17 at 22:31
  • In our case, we pin to an LTS version of ember (2.8), so the jump to 2.13 was a really big (6 month) change. 2.11 worked for us. But long story short: if it worked last week, try 2.12? – abought May 03 '17 at 03:57

1 Answers1

-1

You have an error in your code, That's come from TypeError: Cannot read property '0' of null. review your code and check where this error comes from.

Abderazak Amiar
  • 776
  • 7
  • 22