Skip to content

Sass imports not working as expected #1457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
chanakairugal opened this issue Jul 27, 2016 · 4 comments
Closed

Sass imports not working as expected #1457

chanakairugal opened this issue Jul 27, 2016 · 4 comments

Comments

@chanakairugal
Copy link

chanakairugal commented Jul 27, 2016

OS Windows
Node: v4.4.5
NPM: v3.10.2

Im trying to use susy and breakpoint in layout scss file using default import method.

@import "../../node_modules/susy/sass/susy";

but the build fails with:

File: E:/___temp-projects/TBXSurfCSS/tmp/sassplugin-input_base_path-jREz02B2.tmp/0/src/demo-app/base-layout.scss (9)
The Broccoli Plugin: [SASSPlugin] failed with:
Error: File to import not found or unreadable: sass/susy
Parent style sheet: E:/___temp-projects/TBXSurfCSS/tmp/sassplugin-input_base_path-jREz02B2.tmp/0/src/demo-app/base-layout.scss
    at Object.module.exports.renderSync (E:\___temp-projects\TBXSurfCSS\node_modules\node-sass\lib\index.js:420:22)
    at SASSPlugin.compile (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\lib\broccoli\angular-broccoli-sass.js:52:25)
    at E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\lib\broccoli\angular-broccoli-sass.js:32:14
    at Array.forEach (native)
    at SASSPlugin.build (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\lib\broccoli\angular-broccoli-sass.js:28:22)
    at E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\node_modules\broccoli-caching-writer\index.js:152:21
    at lib$rsvp$$internal$$tryCatch (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1036:16)
    at lib$rsvp$$internal$$invokeCallback (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1048:17)
    at lib$rsvp$$internal$$publish (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1019:11)
    at lib$rsvp$asap$$flush (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1198:9)
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickCallback (node.js:349:13)

The broccoli plugin was instantiated at:
    at SASSPlugin.Plugin (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\node_modules\broccoli-plugin\index.js:10:31)
    at SASSPlugin.CachingWriter [as constructor] (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\node_modules\broccoli-caching-writer\index.js:21:10)
    at new SASSPlugin (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\lib\broccoli\angular-broccoli-sass.js:20:12)
    at Object.Plugin.build.exports.makeBroccoliTree (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\lib\broccoli\angular-broccoli-sass.js:72:12)
    at Angular2App._buildTree (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\lib\broccoli\angular2-app.js:133:27)
    at new Angular2App (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\lib\broccoli\angular2-app.js:53:23)
    at module.exports (E:\___temp-projects\TBXSurfCSS\angular-cli-build.js:10:12)
    at Class.module.exports.Task.extend.setupBroccoliBuilder (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\node_modules\angular-cli\lib\models\builder.js:55:19)
    at Class.module.exports.Task.extend.init (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\node_modules\angular-cli\lib\models\builder.js:89:10)
    at new Class (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\node_modules\core-object\core-object.js:18:12)
    at Class.module.exports.Task.extend.run (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\node_modules\angular-cli\lib\tasks\serve.js:15:19)
    at E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\node_modules\angular-cli\lib\commands\serve.js:64:24
    at lib$rsvp$$internal$$tryCatch (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1036:16)
    at lib$rsvp$$internal$$invokeCallback (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1048:17)
    at lib$rsvp$$internal$$publish (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1019:11)
    at lib$rsvp$asap$$flush (E:\___temp-projects\TBXSurfCSS\node_modules\angular-cli\node_modules\rsvp\dist\rsvp.js:1198:9)

Is there any way to resolve this issue?

P.S. i have notice in another thred (adopted-ember-addons/ember-cli-sass#111) that ember-cli need to include path for that certain modules, since anguler-cli base on ember i did try that also. but its got no luck on me

@filipesilva
Copy link
Contributor

Closed as this issue was made obsolete by #1455.

@zakdances
Copy link

zakdances commented Aug 13, 2016

I'm a bit confused...how was this made obsolete? How do we import from node_modules into our scss?

@filipesilva
Copy link
Contributor

This was made obsolete because we completely overhauled the build system, and thus the error your were experienced can no longer appear (at least verbatim).

Does this still happen in the webpack release? You can install it via these instructions https://github.com/angular/angular-cli#webpack-preview-release-update

If you're still experiencing this issue then I am happy to reopen this, but I'd appreciate a new error log.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants