azat-co / expressworks

Learn Express.js from the author of one of the best books on Express.js—Pro Express.js— with this workshop that will teach you basics of Express.js.
MIT License
709 stars 220 forks source link

Cannot find module 'workshopper-exercise' #60

Closed sergueyarellano closed 9 years ago

sergueyarellano commented 9 years ago

Hi there! When I run expressworks in the terminal and execute a problem I get this error:

module.js:338 throw err; ^ Error: Cannot find module 'workshopper-exercise' at Function.Module._resolveFilename (module.js:336:15) at Function.Module._load (module.js:278:25) at Module.require (module.js:365:17) at require (module.js:384:17) at Object. (/usr/local/lib/node_modules/expressworks/exercises/hello_world/exercise.js:3:21) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12)

at Module.require (module.js:365:17)

I'm using OSX 10.6.8

banquisalm:express banquisalm$ node --version && express --version && expressworks --version v0.12.0 4.11.2 expressworks@2.0.0

Cheers ;)

baconisthecure commented 9 years ago

I'm having the same issue on Windows 7.

jess0407 commented 9 years ago

same here

thomaslam commented 9 years ago

same

vazgen commented 9 years ago

same

ponkon commented 9 years ago

Same issue

sharkovich commented 9 years ago

Just add this line to dependencies in package.json of expressworks module (error gives you location)

"workshopper-exercise": "^2.3.0"

Then run npm install in command line from inside expressworks folder Works for me.

jess0407 commented 9 years ago

Thanks sharkovich! It solves the issue, have sent the pull request with the fix.

sergueyarellano commented 9 years ago

It worked for me too. First install workshopper-exercise with npm Locate and edit with 'vim' (w / permission ) /usr/local/lib/node_modules/expressworks/package.json add the line above and save.

Thanks sharkovich!

martinheidegger commented 9 years ago

:+1:

sqlchow commented 9 years ago

:+1: @sharkovich , thanks for the quick tip. this helps a lot.

batjko commented 9 years ago

Well, not for me. I went into the expressworks sub folder, added the extra dependency and ran npm install, and I can see it having been installed, but I still get the same exception.

I'm on Win8.1, same is true on Win10 TP.

Edit: I resorted to installing workshopper-exercise globally, which then finally worked.

ccysfn commented 9 years ago

well done! For me,under the location : ... C:\Users\Administrator\AppData\Roaming\npm\node_modules\expressworks ... add that line then npm install then "expressworks" worked

lightonphiri commented 9 years ago

Was having the same problem. Installing workshopper-exercise globally---as @batjko ---suggested is what worked for me as well.

alexandarp commented 9 years ago

Thank you @lightonphiri, it worked for me as well.

NamanJn commented 9 years ago

Yup, just install workshopper - exercise globally.

azat-co commented 9 years ago

merged, please update from NPM thanks!