webark / ember-component-css

An Ember CLI addon which allows you to specify styles for individual components
MIT License
540 stars 115 forks source link

Cannot read property 'close' of undefined when installing #242

Open perlun opened 7 years ago

perlun commented 7 years ago

What am I doing wrong?

$ ember install ember-component-css

Yarn: Installed ember-component-css
Cannot read property 'close' of undefined
TypeError: Cannot read property 'close' of undefined
    at Object.<anonymous> (/Volumes/extra/git/ecraft/cantor-server/node_modules/ember-component-css/node_modules/chalk/index.js:66:74)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Volumes/extra/git/ecraft/cantor-server/node_modules/ember-component-css/node_modules/postcss/lib/css-syntax-error.js:9:14)
    at Module._compile (module.js:569:30)
$ ember -v
ember-cli: 2.14.1
node: 8.2.1
os: darwin x64

(As can be seen, I'm using yarn to maintain the dependencies.)

webark commented 7 years ago

@perlun weird. I have yet to run across this issue.

webark commented 7 years ago

do you have any other reproduction steps?

perlun commented 7 years ago

Tried in a bare repo, worked without problems (see below). So it's probably something in my list of dependencies that causes this. Let's keep this hanging for a while, I'll back to you if I find more details about it.

$ ember init
installing app
  create .editorconfig
  create .ember-cli
  create .eslintrc.js
  create .travis.yml
  create .watchmanconfig
  create README.md
  create app/app.js
  create app/components/.gitkeep
  create app/controllers/.gitkeep
  create app/helpers/.gitkeep
  create app/index.html
  create app/models/.gitkeep
  create app/resolver.js
  create app/router.js
  create app/routes/.gitkeep
  create app/styles/app.css
  create app/templates/application.hbs
  create app/templates/components/.gitkeep
  create config/environment.js
  create config/targets.js
  create ember-cli-build.js
  create .gitignore
  create package.json
  create public/crossdomain.xml
  create public/robots.txt
  create testem.js
  create tests/.eslintrc.js
  create tests/helpers/destroy-app.js
  create tests/helpers/module-for-acceptance.js
  create tests/helpers/resolver.js
  create tests/helpers/start-app.js
  create tests/index.html
  create tests/integration/.gitkeep
  create tests/test-helper.js
  create tests/unit/.gitkeep
  create vendor/.gitkeep
NPM: Installed dependencies
$ yarn install
yarn install v0.27.5
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 11.05s.
$ ember install ember-component-css

Yarn: Installed ember-component-css
Installed addon package.
lolmaus commented 5 years ago

Ran into this too in a project using ember-component-css. Not sure if ember-component-css is to blame, though. This error message regarding chalk is very googlable in non-ember projects.

This helped me: https://github.com/pedronauck/docz/issues/536#issuecomment-449601804