marcoturi / ionic-boilerplate

✨ An Ionic Starter kit featuring Tests, E2E, Karma, Protractor, Jasmine, Istanbul, Gitlab CI, Automatic IPA and APK, TypeScript 2, TsLint, Codelyzer, Typedoc, Yarn, Rollup, and Webpack 2
MIT License
318 stars 107 forks source link

Support Yarn #14

Closed emcniece closed 8 years ago

emcniece commented 8 years ago

This might be a bit out of scope, but I noticed that installing dependencies with Yarn makes the build process fail with a very ambiguous error:

➜  test-app ~ yarn
yarn install v0.16.1
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
warning Incorrect peer dependency "rxjs@5.0.0-beta.12".
warning Incorrect peer dependency "rxjs@5.0.0-beta.12".
warning Incorrect peer dependency "rxjs@5.0.0-beta.12".
warning Incorrect peer dependency "zone.js@0.6.21".
warning Unmet peer dependency "tslint@^3.9.0".
warning Unmet peer dependency "jasmine-core@*".
warning Unmet peer dependency "tslint@^3.0.0".
[4/4] πŸ“ƒ  Building fresh packages...
success Saved lockfile.
✨  Done in 14.63s.

➜  test-app ~ ionic serve

Running 'serve:before' npm script before serve

> test-app@ watch /Users/emcniece/Code/ionic/test-app
> ionic-app-scripts watch

[11:24:02]  ionic-app-scripts 0.0.41
[11:24:02]  watch started ...
[11:24:02]  build dev started ...
[11:24:02]  clean started ...
[11:24:02]  clean finished in 3 ms
[11:24:02]  copy started ...
[11:24:02]  transpile started ...
[11:24:02]  lint started ...
[11:24:04]  lint finished in 1.86 s
[11:24:06]  build dev failed: Cannot read property 'length' of undefined
Editing watch for ignoring spec and e2e files
[11:24:06]  copy finished in 3.90 s
[11:24:06]  watch ready in 3.92 s
The port 8100 was taken on the host localhost - using port 8101 instead
The port 35729 was taken on the host localhost - using port 35730 instead
Running live reload server: http://localhost:35730
Watching: www/**/*, !www/lib/**/*, !www/**/*.map
√ Running dev server:  http://localhost:8101
Ionic server commands, enter:
  restart or r to restart the client app from the root
  goto or g and a url to have the app navigate to the given url
  consolelogs or c to enable/disable console log output
  serverlogs or s to enable/disable server log output
  quit or q to shutdown the server and exit

ionic $

The error is in the middle:

[11:24:06]  build dev failed: Cannot read property 'length' of undefined

I experimented on a fresh clone of master and found that npm install works while yarn does not. There isn't much in the way of hints here, but it's good to note. Feel free to close if this is irrelevant.

marcoturi commented 8 years ago

@emcniece Thank you for opening this issue. I will keep it open as an enhancement request.