Closed phemto5 closed 8 years ago
this is your error
"Error: EACCES, open '/usr/lib/node_modules/expressworks/exercises/stylish_css/public/main.css'" == "Error: EACCES, open '/usr/lib/node_modules/expressworks/exercises/stylish_css/public/main.css'"
"" == ""
I think there has been an update to the modules sine this was released it looks like The Stylus exercise is not working. ` Master Express.js and have fun! ───────────────────────────────── STYLISH CSS Exercise 5 of 8
HTML without styles is boring so this exercise will teach you how to use Stylus with Express on the fly.
Style the HTML from the "STATIC" exercise using Stylus middleware. Stylus https://github.com/stylus/stylus generates .css files on-the-fly from .styl files.
Your solution should listen on the port supplied by process.argv[2] for GET requests, one of which will be for main.css, which should be automatically generated by your Stylus middleware. index.html and main.styl can be found in process.argv[3](they are in the same directory).
You could also create your own folder and use these, if you like:
The main.styl file:
The index.html file:
HINTS
You'll want to plug in some stylus middleware using app.use again. It'll look something like this:
In addition to producing in the "STATIC" exercise, you'll need to serve static files. Remember that middleware is executed in the order app.use is called!
NOTE
For your own projects, Stylus needs to be installed like any other dependency:
» To print these instructions again, run: expressworks print » To execute your program in a test environment, run: expressworks run program.js » To verify your program, run: expressworks verify program.js » For help run: expressworks help
$ expressworks run expressworks.js /usr/lib/node_modules/expressworks/exercises/stylish_css/public Cannot GET /main.css $ expressworks help Usage
expressworks Show a menu to interactively select a workshop. expressworks list Show a newline-separated list of all the workshops. expressworks select NAME Select a workshop. expressworks current Show the currently selected workshop. expressworks print Print the instructions for the currently selected workshop. expressworks next Print the instructions for the next incomplete workshop after the currently selected workshop. expressworks reset Reset completed workshop progress. expressworks run program.js Run your program against the selected input. expressworks verify program.js Verify your program against the expected output. expressworks -l
Change the system to the specified language.
Welcome to ExpressWorks — automated workshop for Express.js framework. Express.js workshop based on workshopper and inspired by stream-adventure by @substack and @maxogden.
API docs:
http://expressjs.com/api.html
Express.js Guide:
http://expressjsguide.com
Issues? Suggestions? Feedback?
https://github.com/azat-co/expressworks/issues
Other awesome workshops: http://nodeschool.io
$ expressworks help Usage
expressworks Show a menu to interactively select a workshop. expressworks list Show a newline-separated list of all the workshops. expressworks select NAME Select a workshop. expressworks current Show the currently selected workshop. expressworks print Print the instructions for the currently selected workshop. expressworks next Print the instructions for the next incomplete workshop after the currently selected workshop. expressworks reset Reset completed workshop progress. expressworks run program.js Run your program against the selected input. expressworks verify program.js Verify your program against the expected output. expressworks -l
Change the system to the specified language.
Welcome to ExpressWorks — automated workshop for Express.js framework. Express.js workshop based on workshopper and inspired by stream-adventure by @substack and @maxogden.
API docs:
http://expressjs.com/api.html
Express.js Guide:
http://expressjsguide.com
Issues? Suggestions? Feedback?
https://github.com/azat-co/expressworks/issues
Other awesome workshops: http://nodeschool.io
$ expressworks run expressworks.js /usr/lib/node_modules/expressworks/exercises/stylish_css/public Error: EACCES, open '/usr/lib/node_modules/expressworks/exercises/stylish_css/public/main.css' Error: EACCES, open '/usr/lib/node_modules/expressworks/exercises/stylish_css/public/main.css' $ expressworks run expressworks.js /usr/lib/node_modules/expressworks/exercises/stylish_css/public Cannot GET /main.css $ expressworks run expressworks.js Cannot GET /main.css $ expressworks verify expressworks.js
Your submission results compared to the expected:
────────────────────────────────────────────────────────────────────────────────
"Cannot GET /main.css" != "Error: EACCES, open '/usr/lib/node_modules/expressworks/exercises/stylish_css/public/main.css'" "" == ""
────────────────────────────────────────────────────────────────────────────────
✗ Submission results did not match expected!
FAIL
Your solution to STYLISH CSS didn't pass. Try again!
[nanderson@nick-fedora meanstack]$ expressworks verify expressworks.js
Your submission results compared to the expected:
────────────────────────────────────────────────────────────────────────────────
"Error: EACCES, open '/usr/lib/node_modules/expressworks/exercises/stylish_css/public/main.css'" == "Error: EACCES, open '/usr/lib/node_modules/expressworks/exercises/stylish_css/public/main.css'" "" == ""
────────────────────────────────────────────────────────────────────────────────
✓ Submission results match expected
PASS
Your solution to STYLISH CSS passed!
Error: EACCES, open '/usr/lib/node_modules/expressworks/exercises/stylish_css/public/main.css' Here's the official solution in case you want to compare notes:
──────────────────────────────────────────────────────────────────────────────── var express = require('express') var app = express()
────────────────────────────────────────────────────────────────────────────────
You have 3 challenges left. Type 'expressworks' to show the menu. `