vadimpopa / ionic2-jspm-seed

ionic2-jspm-seed and plus a typescript starter
MIT License
9 stars 5 forks source link

having trouble running the demo. ionic scss gulp issue. #3

Closed pjwalmsley closed 8 years ago

pjwalmsley commented 8 years ago

Thanks for taking the time to create this seed project. I'm a frontend dev with angular 1 experience trying to run your repo on a windows 7 machine. I install everything as instructed then run the gulp dev task. It fails with the following output:

[15:11:52] Using gulpfile c:\Users\pwalmsley\Development\ionic2-jspm-seed\gulpfile.js [15:11:52] Starting 'build.dev'... [15:11:52] Starting 'sass'... [15:11:52] Finished 'sass' after 27 ms [15:11:52] Starting 'build.index'... [15:11:52] gulp-inject 3 files into index.html. Error in plugin 'sass' [15:11:52] Using gulpfile c:\Users\pwalmsley\Development\ionic2-jspm-seed\gulpfile.js [15:11:52] Starting 'build.dev'... [15:11:52] Starting 'sass'... [15:11:52] Finished 'sass' after 27 ms [15:11:52] Starting 'build.index'... [15:11:52] gulp-inject 3 files into index.html. Error in plugin 'sass' Message: app\app.ios.scss Error: File to import not found or unreadable: ..c:jspm_packagesnpmionic-framework@2.0.0-beta.1ionic.ios.scss Parent style sheet: stdin on line 19 of stdin

@import '..c:\jspm_packages\npm\ionic-framework@2.0.0-beta.1\ionic.ios.scss'; ^

[15:11:52] gulp-inject 1 files into index.html. [15:11:52] Finished 'build.index' after 65 ms [15:11:52] Starting 'copy.fonts.dev'... [15:11:52] Finished 'copy.fonts.dev' after 3.73 ms [15:11:52] Finished 'build.dev' after 114 ms [15:11:52] gulp-inject 1 files into index.html. [15:11:52] Finished 'build.index' after 65 ms [15:11:52] Starting 'copy.fonts.dev'... [15:11:52] Finished 'copy.fonts.dev' after 3.73 ms [15:11:52] Finished 'build.dev' after 114 ms

I've used gulp before for other projects and have it globally installed. Attempting to preference the local install by running "./node_modules/.bin/gulp build.dev" doesn't help. I've recently updated NPM/node.

Any thoughts? "c:jspm..." looks incorrect... Any idea where this is coming from? I presume the scss loader is somehow made aware of my (local) iconic install.

Thanks in advance!

vadimpopa commented 8 years ago

That's a jspm issue which I haven't had yet a chance to fix it. You could ask on jspm repo how to fix that - importing sass from an npm package (ionicons) in other package (ionic2).

pjwalmsley commented 8 years ago

Thanks for the info. I've raised the 'issue' to the jspm team. (link to thread). I'll report back if i figure it out!

vadimpopa commented 8 years ago

Try now, with a little search on jspm-cli github issues where they said that usually the sass work is done before jspm runs trough the packages. So I just figured out, that gulp-sass takes includePaths as option, and by giving that, the imports are resolved ok, without any errors:

includePaths: ['jspm_packages/npm/ionicons@3.0.0-alpha.3/dist/scss']

vadimpopa commented 8 years ago

Although, I've had the issue with the ionicons, now by looking more at your error details, it seems that you are having a different one, something related with the sass file path. Can you try a fresh install, I just updated the packages also to latest versions.

pjwalmsley commented 8 years ago

Pulled and updated npm and jspm packages. Didn't work, nor did adding

includePaths: ['jspm_packages/npm/ionicons@3.0.0-alpha.3/dist/scss']

I think your onto something with the sass path option though. Going to try specifying a base path.

pjwalmsley commented 8 years ago

Changing "global.paths.sass" to "./" seemed to fix the error. Where is this variable defined or is it?

Still din't fix the icon issue (even with the additional sass path)

Thanks for all your help! :)

vadimpopa commented 8 years ago

@pjwalmsley I think you are using an older version. Current one has already that. Also the ionicons issue is fixed already.

vadimpopa commented 8 years ago

Closing as you used a fork of this repo which wasn't updated/maintained.