You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a *.component.styl stylus file I added @import('globals') which resolves to src/styles/globals.styl. With ng serve it works, but ng test fails.
The log given by the failure.
Error: Module build failed: Error: /Users/patrick/dev/leanix-pathfinder-web/src/app/app.component.styl:1:25
1| @require('lib/constants')
------------------------------^
2|
3| .App
4| padding-top: 51px
failed to locate @require file lib/constants.styl
at CachedPathEvaluator.visitImport (/Users/patrick/dev/leanix-pathfinder-web/node_modules/stylus-loader/lib/evaluator.js:157:21)
at CachedPathEvaluator.Visitor.visit (/Users/patrick/dev/leanix-pathfinder-web/node_modules/stylus/lib/visitor/index.js:28:40)
at CachedPathEvaluator.Evaluator.visit (/Users/patrick/dev/leanix-pathfinder-web/node_modules/stylus/lib/visitor/evaluator.js:160:18)
at CachedPathEvaluator.Evaluator.visitRoot (/Users/patrick/dev/leanix-pathfinder-web/node_modules/stylus/lib/visitor/evaluator.js:707:27)
at CachedPathEvaluator.Visitor.visit (/Users/patrick/dev/leanix-pathfinder-web/node_modules/stylus/lib/visitor/index.js:28:40)
at CachedPathEvaluator.Evaluator.visit (/Users/patrick/dev/leanix-pathfinder-web/node_modules/stylus/lib/visitor/evaluator.js:160:18)
at CachedPathEvaluator.Evaluator.evaluate (/Users/patrick/dev/leanix-pathfinder-web/node_modules/stylus/lib/visitor/evaluator.js:247:15)
at Renderer.render (/Users/patrick/dev/leanix-pathfinder-web/node_modules/stylus/lib/renderer.js:86:26)
at /Users/patrick/dev/leanix-pathfinder-web/node_modules/stylus-loader/index.js:163:12
at tryCatchReject (/Users/patrick/dev/leanix-pathfinder-web/node_modules/when/lib/makePromise.js:840:30)
at runContinuation1 (/Users/patrick/dev/leanix-pathfinder-web/node_modules/when/lib/makePromise.js:799:4)
at Fulfilled.when (/Users/patrick/dev/leanix-pathfinder-web/node_modules/when/lib/makePromise.js:590:4)
at Pending.run (/Users/patrick/dev/leanix-pathfinder-web/node_modules/when/lib/makePromise.js:481:13)
at Scheduler._drain (/Users/patrick/dev/leanix-pathfinder-web/node_modules/when/lib/Scheduler.js:62:19)
at Scheduler.drain (/Users/patrick/dev/leanix-pathfinder-web/node_modules/when/lib/Scheduler.js:27:9)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at src/test.ts:279131
OS?
Mac OSX El Capitan
Versions.
angular-cli: 1.0.0-beta.26
node: 6.9.1
os: darwin x64
@angular/common: 2.4.4
@angular/compiler: 2.4.4
@angular/core: 2.4.4
@angular/forms: 2.4.4
@angular/http: 2.4.4
@angular/platform-browser: 2.4.4
@angular/platform-browser-dynamic: 2.4.4
@angular/router: 3.4.4
@angular/compiler-cli: 2.4.4
@angular/tsc-wrapped: 0.5.1
Repro steps.
Make use of the recently added "stylePreprocessorOptions" in angular-cli.json in combination with stylus (#4003).
This is my config:
In a *.component.styl stylus file I added
@import('globals')
which resolves tosrc/styles/globals.styl
. With ng serve it works, but ng test fails.The log given by the failure.
Mention any other details that might be useful.
I have found that in
models/webpack-build-test.js
the stylus-load has no configuration as it does here: https://github.com/angular/angular-cli/pull/4003/files#diff-422be7f05c4af54ddd02152bfc358260R79I think it should be added there as well!?
The text was updated successfully, but these errors were encountered: