stefanpenner / ember-app-kit

deprecated: see https://github.com/stefanpenner/ember-cli
MIT License
1.02k stars 230 forks source link

'validate-imports:tests' fails when converting `app/app.js` to `app/app.coffee` #603

Closed joshuaconner closed 10 years ago

joshuaconner commented 10 years ago
  1. Clone ember-app-kit
  2. npm install
  3. npm install --save-dev grunt-contrib-coffee
  4. Replace app/app.js with an app/app.coffee file that contains https://gist.github.com/anonymous/08d2936d576769ed71b5
  5. grunt server fails with the following output
$ grunt server
Running "server" task

Running "clean:debug" (clean) task
Cleaning tmp...OK

Running "jshint:tooling" (jshint) task
>> 31 files lint free.

Running "createResultDirectory" task

Running "concurrent:buildDebug" (concurrent) task
Running "copy:cssToResult" (copy) task
Copied 1 files

Done, without errors.
Running "preprocess:indexHTMLDebugApp" (preprocess) task

Running "preprocess:indexHTMLDebugTests" (preprocess) task
Running "emberTemplates:debug" (emberTemplates) task

Done, without errors.

    File "tmp/result/assets/templates.js" created.

Done, without errors.
Running "coffee:test" (coffee) task

Running "coffee:app" (coffee) task

Running "jshint:app" (jshint) task
>> 10 files lint free.

Running "jshint:tests" (jshint) task
>> 10 files lint free.

Running "validate-imports:app" (validate-imports) task
>> 10 files validated.

Running "validate-imports:tests" (validate-imports) task
>> appkit/tests/helpers/start-app: Cannot find module "appkit/app"

Warning: Validation errors found in modules. Use --force to continue.

Aborted due to warnings.
    Warning:  Use --force to continue.

        Aborted due to warnings.

Any ideas? I tried moving the coffee task up above the validate-imports:tests tasks in the buildScripts task but it didn't fix it. Removing the validate-imports:tests line allows grunt server to run fine.

Any ideas what I'm doing wrong here? Thanks!

fsmanuel commented 10 years ago

coffeescript and validate-imports don't work together nicely. see https://github.com/stefanpenner/ember-app-kit/issues/546 you should remove "grunt-es6-import-validate": "0.0.6" from your package.json to disable validate-imports when using coffeescript.