javascript-tutorial / server

Server for the Modern Javascript Tutorial
https://javascript.info
Other
452 stars 138 forks source link

Problem with "throttle" after reinstall server #22

Closed HachemiH closed 5 years ago

HachemiH commented 5 years ago

Hi,

after some upgrades of my mac (python, node, etc ...) i got this problem with the server :

The code isn't colored, i can't clic on solutions etc ... The css and the js is missing.

PS : i followed the readme, and the first time it worked fine, i don't understand why now i got this error. Can you help me please, i want continue the translate in french.

I did :

When i launch the server for the first time i got this error :

00:18:11.375Z  INFO importWatch: Import complete
./modules/jsengine/koa/tutorial/client/itemSlider.js
Module not found: Error: Can't resolve 'lib/throttle' in '/Users/Hachemi/js/javascript-tutorial-server/modules/jsengine/koa/tutorial/client'
resolve 'lib/throttle' in '/Users/Hachemi/js/javascript-tutorial-server/modules/jsengine/koa/tutorial/client'
  Parsed request is a module
  using description file: /Users/Hachemi/js/javascript-tutorial-server/package.json (relative path: ./modules/jsengine/koa/tutorial/client)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      looking for modules in /Users/Hachemi/js/javascript-tutorial-server/node_modules
        using description file: /Users/Hachemi/js/javascript-tutorial-server/package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
          using description file: /Users/Hachemi/js/javascript-tutorial-server/package.json (relative path: ./node_modules/lib/throttle)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /Users/Hachemi/js/javascript-tutorial-server/node_modules/lib/throttle doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /Users/Hachemi/js/javascript-tutorial-server/node_modules/lib/throttle.js doesn't exist
            .styl
              Field 'browser' doesn't contain a valid alias configuration
              /Users/Hachemi/js/javascript-tutorial-server/node_modules/lib/throttle.styl doesn't exist
            as directory
              /Users/Hachemi/js/javascript-tutorial-server/node_modules/lib/throttle doesn't exist
      looking for modules in /Users/Hachemi/js/javascript-tutorial-server/modules
        using description file: /Users/Hachemi/js/javascript-tutorial-server/package.json (relative path: ./modules)
          Field 'browser' doesn't contain a valid alias configuration
          using description file: /Users/Hachemi/js/javascript-tutorial-server/package.json (relative path: ./modules/lib/throttle)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /Users/Hachemi/js/javascript-tutorial-server/modules/lib/throttle doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /Users/Hachemi/js/javascript-tutorial-server/modules/lib/throttle.js doesn't exist
            .styl
              Field 'browser' doesn't contain a valid alias configuration
              /Users/Hachemi/js/javascript-tutorial-server/modules/lib/throttle.styl doesn't exist
            as directory
              /Users/Hachemi/js/javascript-tutorial-server/modules/lib/throttle doesn't exist
[/Users/Hachemi/js/javascript-tutorial-server/node_modules/lib/throttle]
[/Users/Hachemi/js/javascript-tutorial-server/node_modules/lib/throttle.js]
[/Users/Hachemi/js/javascript-tutorial-server/node_modules/lib/throttle.styl]
[/Users/Hachemi/js/javascript-tutorial-server/modules/lib/throttle]
[/Users/Hachemi/js/javascript-tutorial-server/modules/lib/throttle.js]
[/Users/Hachemi/js/javascript-tutorial-server/modules/lib/throttle.styl]
 @ ./modules/jsengine/koa/tutorial/client/itemSlider.js 3:15-38
 @ ./modules/jsengine/koa/tutorial/client/index.js
Gulp error details []
[01:18:12] 'webpack' errored after 12 s
[01:18:12] Error: ./modules/jsengine/koa/tutorial/client/itemSlider.js
Module not found: Error: Can't resolve 'lib/throttle' in '/Users/Hachemi/js/javascript-tutorial-server/modules/jsengine/koa/tutorial/client'
resolve 'lib/throttle' in '/Users/Hachemi/js/javascript-tutorial-server/modules/jsengine/koa/tutorial/client'
  Parsed request is a module
  using description file: /Users/Hachemi/js/javascript-tutorial-server/package.json (relative path: ./modules/jsengine/koa/tutorial/client)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      looking for modules in /Users/Hachemi/js/javascript-tutorial-server/node_modules
        using description file: /Users/Hachemi/js/javascript-tutorial-server/package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
          using description file: /Users/Hachemi/js/javascript-tutorial-server/package.json (relative path: ./node_modules/lib/throttle)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /Users/Hachemi/js/javascript-tutorial-server/node_modules/lib/throttle doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /Users/Hachemi/js/javascript-tutorial-server/node_modules/lib/throttle.js doesn't exist
            .styl
              Field 'browser' doesn't contain a valid alias configuration
              /Users/Hachemi/js/javascript-tutorial-server/node_modules/lib/throttle.styl doesn't exist
            as directory
              /Users/Hachemi/js/javascript-tutorial-server/node_modules/lib/throttle doesn't exist
      looking for modules in /Users/Hachemi/js/javascript-tutorial-server/modules
        using description file: /Users/Hachemi/js/javascript-tutorial-server/package.json (relative path: ./modules)
          Field 'browser' doesn't contain a valid alias configuration
          using description file: /Users/Hachemi/js/javascript-tutorial-server/package.json (relative path: ./modules/lib/throttle)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /Users/Hachemi/js/javascript-tutorial-server/modules/lib/throttle doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /Users/Hachemi/js/javascript-tutorial-server/modules/lib/throttle.js doesn't exist
            .styl
              Field 'browser' doesn't contain a valid alias configuration
              /Users/Hachemi/js/javascript-tutorial-server/modules/lib/throttle.styl doesn't exist
            as directory
              /Users/Hachemi/js/javascript-tutorial-server/modules/lib/throttle doesn't exist
[/Users/Hachemi/js/javascript-tutorial-server/node_modules/lib/throttle]
[/Users/Hachemi/js/javascript-tutorial-server/node_modules/lib/throttle.js]
[/Users/Hachemi/js/javascript-tutorial-server/node_modules/lib/throttle.styl]
[/Users/Hachemi/js/javascript-tutorial-server/modules/lib/throttle]
[/Users/Hachemi/js/javascript-tutorial-server/modules/lib/throttle.js]
[/Users/Hachemi/js/javascript-tutorial-server/modules/lib/throttle.styl]
 @ ./modules/jsengine/koa/tutorial/client/itemSlider.js 3:15-38
 @ ./modules/jsengine/koa/tutorial/client/index.js
    at formatError (/Users/Hachemi/js/javascript-tutorial-server/node_modules/gulp/bin/gulp.js:169:10)
    at Gulp.<anonymous> (/Users/Hachemi/js/javascript-tutorial-server/node_modules/gulp/bin/gulp.js:195:15)
    at Gulp.emit (events.js:182:13)
    at Gulp.Orchestrator._emitTaskDone (/Users/Hachemi/js/javascript-tutorial-server/node_modules/orchestrator/index.js:264:8)
    at /Users/Hachemi/js/javascript-tutorial-server/node_modules/orchestrator/index.js:275:23
    at finish (/Users/Hachemi/js/javascript-tutorial-server/node_modules/orchestrator/lib/runTask.js:21:8)
    at cb (/Users/Hachemi/js/javascript-tutorial-server/node_modules/orchestrator/lib/runTask.js:29:3)
    at /Users/Hachemi/js/javascript-tutorial-server/tasks/webpack.js:26:28
    at finalCallback (/Users/Hachemi/js/javascript-tutorial-server/node_modules/webpack/lib/Compiler.js:210:39)
    at hooks.done.callAsync.err (/Users/Hachemi/js/javascript-tutorial-server/node_modules/webpack/lib/Compiler.js:226:13)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/Hachemi/js/javascript-tutorial-server/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1)
    at AsyncSeriesHook.lazyCompileHook (/Users/Hachemi/js/javascript-tutorial-server/node_modules/tapable/lib/Hook.js:154:20)
    at onCompiled (/Users/Hachemi/js/javascript-tutorial-server/node_modules/webpack/lib/Compiler.js:224:21)
    at hooks.afterCompile.callAsync.err (/Users/Hachemi/js/javascript-tutorial-server/node_modules/webpack/lib/Compiler.js:552:14)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/Hachemi/js/javascript-tutorial-server/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/Users/Hachemi/js/javascript-tutorial-server/node_modules/tapable/lib/Hook.js:154:20)
    at compilation.seal.err (/Users/Hachemi/js/javascript-tutorial-server/node_modules/webpack/lib/Compiler.js:549:30)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/Hachemi/js/javascript-tutorial-server/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/Users/Hachemi/js/javascript-tutorial-server/node_modules/tapable/lib/Hook.js:154:20)
    at hooks.optimizeAssets.callAsync.err (/Users/Hachemi/js/javascript-tutorial-server/node_modules/webpack/lib/Compilation.js:1323:35)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/Hachemi/js/javascript-tutorial-server/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (/Users/Hachemi/js/javascript-tutorial-server/node_modules/tapable/lib/Hook.js:154:20)
00:18:29.523Z  INFO application: --> GET /hello-world (requestId=57a357c1-233f-489c-80ba-2be04436fce8, event=request-start, method=GET, url=/hello-world, referer=http://localhost:3000/)
    ua: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:64.0) Gecko/20100101 Firefox/64.0
00:18:30.070Z  INFO application: --> GET /pack/styles.css (requestId=c6b3a5d2-be1c-49c6-a78d-4c38d66c7ec6, event=request-start, method=GET, url=/pack/styles.css, referer=http://localhost:3000/hello-world)
    ua: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:64.0) Gecko/20100101 Firefox/64.0
00:18:30.071Z ERROR application: <-- GET /pack/styles.css (requestId=c6b3a5d2-be1c-49c6-a78d-4c38d66c7ec6, event=request-end, method=GET, url=/pack/styles.css, status=404, timeDuration=1)
00:18:30.072Z ERROR application:  (requestId=c6b3a5d2-be1c-49c6-a78d-4c38d66c7ec6, message="Not Found", status=404, referer=http://localhost:3000/hello-world)
    stack: NotFoundError: Not Found
        at Object.throw (/Users/Hachemi/js/javascript-tutorial-server/node_modules/koa/lib/context.js:97:11)
        at /Users/Hachemi/js/javascript-tutorial-server/modules/jsengine/koa/404.js:10:16
    --
    cookie: Webstorm-8784df8a=74ea6eff-f890-46bf-8ac7-b6e4f911b702; pixelRatio=3
00:18:30.244Z  INFO application: --> GET /pack/head.js (requestId=d57c1cbf-5e44-493c-bb8e-7dd7cc23df5e, event=request-start, method=GET, url=/pack/head.js, referer=http://localhost:3000/hello-world)
    ua: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:64.0) Gecko/20100101 Firefox/64.0
00:18:30.244Z ERROR application: <-- GET /pack/head.js (requestId=d57c1cbf-5e44-493c-bb8e-7dd7cc23df5e, event=request-end, method=GET, url=/pack/head.js, status=404, timeDuration=0)
00:18:30.244Z ERROR application:  (requestId=d57c1cbf-5e44-493c-bb8e-7dd7cc23df5e, message="Not Found", status=404, referer=http://localhost:3000/hello-world)
    stack: NotFoundError: Not Found
        at Object.throw (/Users/Hachemi/js/javascript-tutorial-server/node_modules/koa/lib/context.js:97:11)
        at /Users/Hachemi/js/javascript-tutorial-server/modules/jsengine/koa/404.js:10:16
    --
    cookie: Webstorm-8784df8a=74ea6eff-f890-46bf-8ac7-b6e4f911b702; pixelRatio=3
00:18:30.246Z  INFO application: --> GET /pack/tutorial.js (requestId=c51280c2-e7e0-4ac0-a883-c9778750f88e, event=request-start, method=GET, url=/pack/tutorial.js, referer=http://localhost:3000/hello-world)
    ua: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:64.0) Gecko/20100101 Firefox/64.0
00:18:30.247Z ERROR application: <-- GET /pack/tutorial.js (requestId=c51280c2-e7e0-4ac0-a883-c9778750f88e, event=request-end, method=GET, url=/pack/tutorial.js, status=404, timeDuration=1)
00:18:30.247Z ERROR application:  (requestId=c51280c2-e7e0-4ac0-a883-c9778750f88e, message="Not Found", status=404, referer=http://localhost:3000/hello-world)
    stack: NotFoundError: Not Found
        at Object.throw (/Users/Hachemi/js/javascript-tutorial-server/node_modules/koa/lib/context.js:97:11)
        at /Users/Hachemi/js/javascript-tutorial-server/modules/jsengine/koa/404.js:10:16
    --
    cookie: Webstorm-8784df8a=74ea6eff-f890-46bf-8ac7-b6e4f911b702; pixelRatio=3
00:18:30.249Z  INFO application: --> GET /pack/footer.js (requestId=c0dd4d53-7999-4ea1-bb58-aa5e7a1b2466, event=request-start, method=GET, url=/pack/footer.js, referer=http://localhost:3000/hello-world)
    ua: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:64.0) Gecko/20100101 Firefox/64.0
00:18:30.249Z ERROR application: <-- GET /pack/footer.js (requestId=c0dd4d53-7999-4ea1-bb58-aa5e7a1b2466, event=request-end, method=GET, url=/pack/footer.js, status=404, timeDuration=0)
00:18:30.249Z ERROR application:  (requestId=c0dd4d53-7999-4ea1-bb58-aa5e7a1b2466, message="Not Found", status=404, referer=http://localhost:3000/hello-world)
    stack: NotFoundError: Not Found
        at Object.throw (/Users/Hachemi/js/javascript-tutorial-server/node_modules/koa/lib/context.js:97:11)
        at /Users/Hachemi/js/javascript-tutorial-server/modules/jsengine/koa/404.js:10:16
    --
    cookie: Webstorm-8784df8a=74ea6eff-f890-46bf-8ac7-b6e4f911b702; pixelRatio=3
00:18:30.295Z  INFO application: --> GET /pack/head.js (requestId=3fe5dab5-2dae-43d1-9d5c-b1c36c62d828, event=request-start, method=GET, url=/pack/head.js, referer=http://localhost:3000/hello-world)
    ua: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:64.0) Gecko/20100101 Firefox/64.0
00:18:30.296Z ERROR application: <-- GET /pack/head.js (requestId=3fe5dab5-2dae-43d1-9d5c-b1c36c62d828, event=request-end, method=GET, url=/pack/head.js, status=404, timeDuration=1)
00:18:30.296Z ERROR application:  (requestId=3fe5dab5-2dae-43d1-9d5c-b1c36c62d828, message="Not Found", status=404, referer=http://localhost:3000/hello-world)
    stack: NotFoundError: Not Found
        at Object.throw (/Users/Hachemi/js/javascript-tutorial-server/node_modules/koa/lib/context.js:97:11)
        at /Users/Hachemi/js/javascript-tutorial-server/modules/jsengine/koa/404.js:10:16
    --
    cookie: Webstorm-8784df8a=74ea6eff-f890-46bf-8ac7-b6e4f911b702; pixelRatio=3
00:18:30.313Z  INFO application: --> GET /pack/tutorial.js (requestId=250bf1f5-699f-4d69-bfa8-90a4a829a97b, event=request-start, method=GET, url=/pack/tutorial.js, referer=http://localhost:3000/hello-world)
    ua: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:64.0) Gecko/20100101 Firefox/64.0
00:18:30.313Z ERROR application: <-- GET /pack/tutorial.js (requestId=250bf1f5-699f-4d69-bfa8-90a4a829a97b, event=request-end, method=GET, url=/pack/tutorial.js, status=404, timeDuration=0)
00:18:30.314Z ERROR application:  (requestId=250bf1f5-699f-4d69-bfa8-90a4a829a97b, message="Not Found", status=404, referer=http://localhost:3000/hello-world)
    stack: NotFoundError: Not Found
        at Object.throw (/Users/Hachemi/js/javascript-tutorial-server/node_modules/koa/lib/context.js:97:11)
        at /Users/Hachemi/js/javascript-tutorial-server/modules/jsengine/koa/404.js:10:16
    --
    cookie: Webstorm-8784df8a=74ea6eff-f890-46bf-8ac7-b6e4f911b702; pixelRatio=3
00:18:30.315Z  INFO application: --> GET /pack/footer.js (requestId=80c4b5bd-e806-4900-933b-e071f865fef1, event=request-start, method=GET, url=/pack/footer.js, referer=http://localhost:3000/hello-world)
    ua: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:64.0) Gecko/20100101 Firefox/64.0
00:18:30.315Z ERROR application: <-- GET /pack/footer.js (requestId=80c4b5bd-e806-4900-933b-e071f865fef1, event=request-end, method=GET, url=/pack/footer.js, status=404, timeDuration=0)
00:18:30.316Z ERROR application:  (requestId=80c4b5bd-e806-4900-933b-e071f865fef1, message="Not Found", status=404, referer=http://localhost:3000/hello-world)
    stack: NotFoundError: Not Found
        at Object.throw (/Users/Hachemi/js/javascript-tutorial-server/node_modules/koa/lib/context.js:97:11)
        at /Users/Hachemi/js/javascript-tutorial-server/modules/jsengine/koa/404.js:10:16
    --
    cookie: Webstorm-8784df8a=74ea6eff-f890-46bf-8ac7-b6e4f911b702; pixelRatio=3
iliakan commented 5 years ago

Sorry for the delay, please git pull. Works now.

HachemiH commented 5 years ago

Thank you iliakan, it's worked fine excepted, the solution link isn't working in the tasks.

iliakan commented 5 years ago

@BusseBu Please take a look at the solution link in tasks, is it broken now?

BusseBu commented 5 years ago

@HachemiH do you mean that solution link? https://i.imgur.com/bvZY3dt.png

HachemiH commented 5 years ago

@BusseBu sorry for the late response. No it's this solution link : https://imgur.com/5EEJoMk

iliakan commented 5 years ago

Probably fixed?

HachemiH commented 5 years ago

Hi,

Nope still the same problem, not a big problem, but can't clic on solutions links ...