Code Monkey home page Code Monkey logo

server's Introduction

Tutorial Server

Hi everyone!

This is a standalone server for the javascript tutorial https://javascript.info.

You can use it to run the tutorial locally and translate it into your language.

Windows, Unix systems and macOS are supported. For Windows, you'll need to call scripts with ".cmd" extension, that are present in the code alongside with Unix versions.

Installation

  1. Install Git and Node.js.

    These are required to update and run the project. For Windows just download and install, otherwise use standard OS install tools (packages or whatever convenient).

    (Maybe later, optional) If you're going to change images, please install ImageMagick, use packages for Linux or homebrew/macports for MacOS.

  2. Install global Node modules:

    npm install -g bunyan gulp@4
  3. Create the root folder.

    Create a folder /js for the project.

    You can also use another directory as the root, then change the paths below: replace /js with your root.

  4. Clone the tutorial server into it:

    cd /js
    git clone https://github.com/javascript-tutorial/server
    git clone https://github.com/javascript-tutorial/engine server/modules/engine

    Please note, there are two clone commands. That's not a typo: modules/engine is cloned from another repository.

    And please don't forget when pulling an updated server code: modules/engine needs to be pulled too.

  5. Clone the tutorial text into it.

    The repository starts with the language code, e.g for the French version fr.javascript.info, for Russian – ru.javascript.info, for Chinese zh.javascript.info etc.

    The English version is en.javascript.info.

    The tutorial text repository should go into the repo subfolder, like this:

    cd /js/server/repo
    git clone https://github.com/javascript-tutorial/en.javascript.info
  6. Run the site

    Install local NPM modules:

    cd /js/server
    npm install

    Run the site with the ./edit command with the language argument. Above we cloned en tutorial, so:

    ./edit en

    This will import the tutorial from /js/server/repo/en.javascript.info and start the server.

    Wait a bit while it reads the tutorial from the disk and builds static assets.

    Then access the site at http://127.0.0.1:3000.

    To change the port, set the PORT environment variable:

    # Runs the server at http://127.0.0.1:8080
    PORT=8080 ./edit en

    For Windows, read the note about environment variables below.

  7. Edit the tutorial

    As you edit text files in the tutorial text repository (cloned at step 5), the webpage will reload automatically.

Windows: Environment variables

For Windows, to pass environment variables, such as PORT, you can install npm i -g cross-env and prepend calls with cross-env, like this:

cd /js/server
cross-env PORT=8080 ./edit en

In the examples below, the commands are without cross-env, prepend it please, if you're on Windows.

Alternatively, you can use other Windows-specific ways to set environment variables, such as a separate set PORT=8080 command.

Change server language

The server uses English by default for navigation and design.

You can set another language it with the second argument of edit.

E.g. if you cloned ru tutorial, it makes sense to use ru locale for the server as well:

cd /js/server
./edit ru ru

Please note, the server must support that language. There must be corresponding locale files for that language in the code of the server, otherwise it exists with an error. As of now, ru, en, zh, tr, ko and ja are fully supported.

Translating images

Please don't translate SVG files manually.

They are auto-generated from the English variant, with the text phrases substituted from images.yml file in the repository root, such as https://github.com/javascript-tutorial/ru.javascript.info/blob/master/images.yml.

So you need to translate the content of images.yml and re-generate the SVGs using a script.

Here are the steps to translate images.

Step 1. Setup git upstream (if you haven't yet) and pull latest changes from English version:

cd /js/server/repo/zh.javascript.info # in the tutorial folder

git remote add upstream https://github.com/javascript-tutorial/en.javascript.info

git fetch upstream master

Step 2. Create images.yml with translations in the repository root.

An example of such file (in Russian): https://github.com/javascript-tutorial/ru.javascript.info/blob/master/images.yml

The file format is YAML.

Here's a quote:

code-style.svg:  # image file name
  "No space":    # English string
    text: "Без пробелов" # translation
    position: "center" # (optional) "center" or "right" - to position the translated string
  "between the function name and parentheses":
    position: "center"
    text: "между именем функции и скобками"

As you can see, for each image file there's a name (such as code-style.svg), and then goes the list of its English phrases (such as "No space"), accompanied by translations:

  • text is the translated text
  • position (not always needed, details will come soon) is the relative position of the text.

Initially, the file may be empty, then you can fill it with images one by one.

Only the mentioned images will be translated.

Step 3. Use the helper script to get a list of strings to translate:

The script is executed from the server root, like this:

# Adjust NODE_LANG to your language

❯ NODE_LANG=zh npm run gulp -- engine:koa:tutorial:imageYaml --image code-style.svg

Here's an example of its output:

code-style.svg:
  '2': ''
  No space: ''
  between the function name and parentheses: ''
  between the parentheses and the parameter: ''
  Indentation: ''
  2 spaces: ''
  'A space ': ''
  after for/if/while…: ''
  '} else { without a line break': ''
  Spaces around a nested call: ''
  An empty line: ''
  between logical blocks: ''
  Lines are not very long: ''
  A semicolon ;: ''
  is mandatory: ''
  Spaces: ''
  around operators: ''
  Curly brace {: ''
  on the same line, after a space: ''
  A space: ''
  between: ''
  arguments: ''
  A space between parameters: ''

As we can see, the script returns a text snippet that can be inserted into images.yml fully or partially.

E.g. like this:

code-style.svg:
  'A space ': 'Пробел'

Or like this, if we want to position the translation in the center (see below for more examples):

code-style.svg:
  'A space ':
    position: 'center'
    text: 'Пробел'

Step 4. Run the translation task:

cd /js/server # in the server folder

# adjust NODE_LANG to your language

NODE_LANG=zh npm run gulp -- engine:koa:tutorial:figuresTranslate

This script checks out all SVG images from upstream (English version) and replaces the strings inside them according to images.yml. So they become translated.

The new translated SVGs are the tutorial folder now, but not committed yet.

You can see them with git status.

Take a moment to open and check them, e.g. in Chrome browser, just to ensure that the translation looks good.

P.S. If an image appears untranslated on refresh, force the browser to "reload without cache" (hotkeys).

Step 5. Then you'll need to git add/commit/push the translated SVGs, as a part of the normal translation flow.

...And voilà! SVGs are translated!

Normally, the translation script looks for all images listed in images.yml. To translate a single image, use the --image parameter of the script:

# replace strings only in try-catch-flow.svg
NODE_LANG=zh npm run gulp -- engine:koa:tutorial:figuresTranslate --image try-catch-flow.svg

Read on for more advanced options and troubleshooting.

Positioning

For the positioning to work, sure you have installed ImageMagick mentioned in the installation step.

By default, the translated string replaces the original one, starting in exactly the same place of the image.

Before the translation:

| hello world

After the translation ( is at the same place where h was, the string is left-aligned):

| 你好世界

Sometimes that's not good, e.g. if the string needs to be centered, e.g. like this:

     |
hello world
     |

Here, the "hello world" is centered between two vertical lines |.

Then, if we just replace the string, it would become:

     |
你好世界
     |

As we can see, the new phrase is shorter. We should move it to the right a bit.

The position: "center" in images.yml does exactly that.

It centers the translated string, so that it will replace the original one and stay "in the middle" of the surrounding context.

Here's the text with position: "center", centered as it should be:

   |
你好世界
   |

The position: "right" makes sure that the translated string sticks to the same right edge:

hello world |
    你好世界 |

That's also useful for images when we expect the text to stick to the right.

The "overflowing text" problem

The replacement script only operates on strings, not other graphics, so a long translated string may not fit the picture.

Most pictures have some extra space for longer text, so a slight increase doesn't harm.

If the translated text is much longer, please try to change it, make it shorter to fit.

If the translated text absolutely must be longer and doesn't fit, let me know, we'll see how to adjust the picture.

Troubleshooting images translation

If you add a translation to images.yml, but after running the script the SVG remains the same, so that the translation doesn't "catch up":

  1. Ensure that you have the latest server code and translation repos, fetched the upstream.
  2. Check if the English version has the file with the same name. The file could have been renamed.
  3. Check that there's only 1 file with the given name in the tutorial. Sometimes there may be duplicates.
  4. Check that the translated string in images.yml is exactly as in SVG: use the helper script (Step 3) to extract all strings.

If it still doesn't work – file an issue.

Dev mode

If you'd like to edit the server code (assuming you're familiar with Node.js), not the tutorial text, then there are two steps to do.

First, run the command that imports (and caches) the tutorial:

cd /js/server
NODE_LANG=en npm run gulp engine:koa:tutorial:import

For Windows: npm i -g cross-env and prepend the call with cross-env to pass environment variables, like this:

cd /js/server
cross-env NODE_LANG=en...

Afterwards, call ./dev <server language> to run the server:

cd /js/server
./dev en

Running ./dev uses the tutorial that was imported and cached by the previous command.

It does not "watch" tutorial text, but it reloads the server after code changes.

Again, that's for developing the server code itself, not writing the tutorial.

Troubleshooting

Please ensure you have Node.js version 10+ (node -v shows the version).

If it still doesn't work – file an issue. Please mention OS and Node.js version.

Please pull the very latest git code and install latest NPM modules before publishing an issue.

Linux: inotify and monitored files

The server's tools use inotify by default on Linux to monitor directories for changes. In some cases there may be too many items to monitor.

! Samples code below work correctly for Ubuntu.

You can get your current inotify files watch limit by:

$> cat /proc/sys/fs/inotify/max_user_watches

When this limit is not enough to monitor all files, you have to increase the limit for the server to work properly.

You can set a new limit temporary by:

$> sudo sysctl fs.inotify.max_user_watches=524288
$> sudo sysctl -p

It is very important that you refer to the documentation for your operating system to change this parameter permanently.

--
Yours,
Ilya Kantor
[email protected]

server's People

Contributors

bhaltair avatar dvmhmdsd avatar iliakan avatar joaquinelio avatar jonnathan-ls avatar kenjii avatar leviding avatar lex111 avatar liangminhua avatar omariohassan avatar oshliaer avatar violet-bora-lee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

server's Issues

Cannot find module 'engine/koa/tutorial/repos'

Hi,
After all changes with translations, i've decided to reinstall completely server and i got this error :

internal/modules/cjs/loader.js:657
    throw err;
    ^

Error: Cannot find module 'engine/koa/tutorial/repos'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:655:15)
    at Function.Module._load (internal/modules/cjs/loader.js:580:25)
    at Module.require (internal/modules/cjs/loader.js:711:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at Object.<anonymous> (/Users/Hachemi/sites/lab/js/server/modules/config/index.js:68:13)
    at Module._compile (internal/modules/cjs/loader.js:805:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:816:10)
    at Module.load (internal/modules/cjs/loader.js:672:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:612:12)
    at Function.Module._load (internal/modules/cjs/loader.js:604:3)

Did i miss something ?

invalid command

On macOS the follow command from Readme isn't working:
NODE_LANG=zh glp engine:koa:tutorial:figuresTranslate --image try-catch-flow.svg

This one is working but for all images, even if I set --image:
NODE_LANG=ru npm run gulp engine:koa:tutorial:figuresTranslate --image variable.svg

I tried --image variable.svg, --image=variable.svg, --image="varibale.svg", but all of them generates all translation for images (I need for specific one).

The second issue I found is word "Hello!" in 1-js/02-first-steps/04-variables/variable.svg. How to translate this text?
images.yml

variable.svg:
  "Hello!": '"Привет!"'  // should be: '"Hello!"': '"Привіт!"'
  message: 'Сообщение'

Can I simply edit svg images directly without changing images.yml ?
This variant is better for me, because I can exactly change position of text (by changing x and y attributes) and even font-size.

postcss-loader v4.0.0 released

Due to the latest version of postcss-loader(v4.0.0) released on 9/7, an error ModuleBuildError occurs.

👇 Error message:

Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
ValidationError: Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.

Check major changes in release note,

  • PostCSS (plugins/syntax/parser/stringifier) options was moved to the postcssOptions option, please look at docs

There are two ways to fix this.

  1. Change PostCss to postcssOptions
  2. Fix postcss-loader version to 3.0.0 in package.json

The first method seems better, so let me make a pull request using the first method.

error while installing local server

Ubuntu 18.04, latest update, Node v8.11.3, npm v5.6.0
I followed all the steps carefully, and run 'npm install' and ./edit uz
got this:
$ npm install
npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

[email protected] install /home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/dtrace-provider
node-gyp rebuild || node suppress-error.js

make: Entering directory '/home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/dtrace-provider/build'
TOUCH Release/obj.target/DTraceProviderStub.stamp
make: Leaving directory '/home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/dtrace-provider/build'

[email protected] postinstall /home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/nodemon
node bin/postinstall || exit 0

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 1276 packages in 39.221s


$ ./edit uz

ahmad@matebook:~/code/jsuz/javascript-tutorial-server$ ./edit uz
[10:22:25] Using gulpfile ~/code/jsuz/javascript-tutorial-server/gulpfile.js
[10:22:25] Starting 'client:webpack'...
[10:22:25] Starting 'tutorial:importWatch'...
{"name":"tutorialImporter","hostname":"matebook","pid":24562,"level":30,"msg":"sync /home/ahmad/code/jsuz/javascript-tutorial-uz/1-js","time":"2018-07-21T02:22:26.156Z","v":0}
{"name":"tutorialImporter","hostname":"matebook","pid":24562,"level":30,"msg":"syncFolder /home/ahmad/code/jsuz/javascript-tutorial-uz/1-js","time":"2018-07-21T02:22:26.157Z","v":0}
[10:22:26] Starting 'client:sync-resources'...
[10:22:26] Finished 'client:sync-resources' after 27 ms
[10:22:26] Starting 'client:livereload'...
[10:22:26] Starting 'server'...
(node:24562) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead
{"name":"tutorialImporter","hostname":"matebook","pid":24562,"level":30,"msg":"syncFolder /home/ahmad/code/jsuz/javascript-tutorial-uz/1-js/01-getting-started","time":"2018-07-21T02:22:26.302Z","v":0}
{"name":"tutorialImporter","hostname":"matebook","pid":24562,"level":30,"msg":"syncArticle /home/ahmad/code/jsuz/javascript-tutorial-uz/1-js/01-getting-started/1-intro","time":"2018-07-21T02:22:26.304Z","v":0}
{"name":"application","hostname":"matebook","pid":24562,"level":30,"msg":"Server is listening 0.0.0.0:3000","time":"2018-07-21T02:22:26.316Z","v":0}
[10:22:26] Finished 'server' after 110 ms
{"name":"tutorialImporter","hostname":"matebook","pid":24562,"level":30,"msg":"syncArticle /home/ahmad/code/jsuz/javascript-tutorial-uz/1-js/01-getting-started/2-code-editors","time":"2018-07-21T02:22:26.350Z","v":0}
{"name":"tutorialImporter","hostname":"matebook","pid":24562,"level":30,"msg":"syncArticle /home/ahmad/code/jsuz/javascript-tutorial-uz/1-js/01-getting-started/3-devtools","time":"2018-07-21T02:22:26.355Z","v":0}
{"name":"tutorialImporter","hostname":"matebook","pid":24562,"level":30,"msg":"syncFolder /home/ahmad/code/jsuz/javascript-tutorial-uz/1-js/02-first-steps","time":"2018-07-21T02:22:26.430Z","v":0}
{"name":"tutorialImporter","hostname":"matebook","pid":24562,"level":30,"msg":"syncArticle /home/ahmad/code/jsuz/javascript-tutorial-uz/1-js/02-first-steps/01-hello-world","time":"2018-07-21T02:22:26.432Z","v":0}
{"name":"tutorialImporter","hostname":"matebook","pid":24562,"level":30,"msg":"syncView: dir /home/ahmad/code/jsuz/javascript-tutorial-uz/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.view","time":"2018-07-21T02:22:26.439Z","v":0}
[10:22:26] 'tutorial:importWatch' errored after 882 ms
[10:22:26] TypeError: mime.lookup is not a function
at /home/ahmad/code/jsuz/javascript-tutorial-server/handlers/tutorial/lib/tutorialImporter.js:579:21
at Array.filter ()
at readFs (/home/ahmad/code/jsuz/javascript-tutorial-server/handlers/tutorial/lib/tutorialImporter.js:570:17)
at TutorialImporter.syncView (/home/ahmad/code/jsuz/javascript-tutorial-server/handlers/tutorial/lib/tutorialImporter.js:385:25)
at TutorialImporter.syncTask (/home/ahmad/code/jsuz/javascript-tutorial-server/handlers/tutorial/lib/tutorialImporter.js:347:20)
at
Gulp error details [ 'mime.lookup is not a function',
'TypeError: mime.lookup is not a function\n at /home/ahmad/code/jsuz/javascript-tutorial-server/handlers/tutorial/lib/tutorialImporter.js:579:21\n at Array.filter ()\n at readFs (/home/ahmad/code/jsuz/javascript-tutorial-server/handlers/tutorial/lib/tutorialImporter.js:570:17)\n at TutorialImporter.syncView (/home/ahmad/code/jsuz/javascript-tutorial-server/handlers/tutorial/lib/tutorialImporter.js:385:25)\n at TutorialImporter.syncTask (/home/ahmad/code/jsuz/javascript-tutorial-server/handlers/tutorial/lib/tutorialImporter.js:347:20)\n at ' ]
[10:22:29] livereload: listen on change public/pack/**/.,!public/pack/head.js
[10:22:31] [webpack] Time: 5771ms
Built at: 2018-07-21 10:22:31
Asset Size Chunks Chunk Names
styles/blocks/font/icons.woff 14.6 KiB [emitted]
styles/blocks/font/icons.otf 22.6 KiB [emitted]
styles/blocks/page-footer/slack.svg 1.49 KiB [emitted]
styles.css 85.7 KiB 0 [emitted] styles
styles.js 1.13 KiB 0 [emitted] styles
head.js 18.3 KiB 1 [emitted] head
tutorial.js 34 KiB 2 [emitted] tutorial
footer.js 4.59 KiB 3 [emitted] footer
Entrypoint styles = styles.css styles.js
Entrypoint head = head.js
Entrypoint tutorial = tutorial.js
Entrypoint footer = footer.js
Child mini-css-extract-plugin node_modules/css-loader/index.js??ref--9-1!node_modules/postcss-loader/lib/index.js??ref--9-2!modules/hover-loader.js!node_modules/stylus-loader/index.js??ref--9-4!tmp/styles.styl:
Asset Size Chunks Chunk Names
styles/blocks/font/icons.woff 14.6 KiB [emitted]
styles/blocks/font/icons.otf 22.6 KiB [emitted]
styles/blocks/page-footer/slack.svg 1.49 KiB [emitted]
Entrypoint mini-css-extract-plugin = *
[10:22:31] Finished 'client:webpack' after 5.97 s


And I did: $ npm install mime
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})


and again: $ ./edit uz
ahmad@matebook:~/code/jsuz/javascript-tutorial-server$ ./edit uz
[10:30:02] Using gulpfile ~/code/jsuz/javascript-tutorial-server/gulpfile.js
[10:30:02] Starting 'client:webpack'...
[10:30:02] Starting 'tutorial:importWatch'...
[10:30:03] 'tutorial:importWatch' errored after 325 ms
[10:30:03] Error: Pug file bemto.pug/lib/index from /home/ahmad/code/jsuz/javascript-tutorial-server/modules/markit/templates/codeTabs.pug not resolved
at /home/ahmad/code/jsuz/javascript-tutorial-server/modules/markit/templates/codeTabs.pug line 1
at Object.pugResolve [as resolve] (/home/ahmad/code/jsuz/javascript-tutorial-server/modules/pugResolve.js:34:13)
at Object.resolve (/home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug/lib/index.js:132:16)
at /home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug-load/index.js:22:26
at walkAST (/home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug-walk/index.js:23:18)
at /home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug-walk/index.js:104:20
at Array.reduce ()
at walkAndMergeNodes (/home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug-walk/index.js:103:18)
at walkAST (/home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug-walk/index.js:37:19)
at load (/home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug-load/index.js:13:10)
at Function.loadString [as string] (/home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug-load/index.js:46:10)
at compileBody (/home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug/lib/index.js:86:18)
at Object.exports.compile (/home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug/lib/index.js:242:16)
at Object.require.extensions..pug (/home/ahmad/code/jsuz/javascript-tutorial-server/modules/lib/serverPug/index.js:13:22)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
Gulp error details [ 'Pug file bemto.pug/lib/index from /home/ahmad/code/jsuz/javascript-tutorial-server/modules/markit/templates/codeTabs.pug not resolved\n at /home/ahmad/code/jsuz/javascript-tutorial-server/modules/markit/templates/codeTabs.pug line 1',
'Error: Pug file bemto.pug/lib/index from /home/ahmad/code/jsuz/javascript-tutorial-server/modules/markit/templates/codeTabs.pug not resolved\n at /home/ahmad/code/jsuz/javascript-tutorial-server/modules/markit/templates/codeTabs.pug line 1\n at Object.pugResolve [as resolve] (/home/ahmad/code/jsuz/javascript-tutorial-server/modules/pugResolve.js:34:13)\n at Object.resolve (/home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug/lib/index.js:132:16)\n at /home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug-load/index.js:22:26\n at walkAST (/home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug-walk/index.js:23:18)\n at /home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug-walk/index.js:104:20\n at Array.reduce ()\n at walkAndMergeNodes (/home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug-walk/index.js:103:18)\n at walkAST (/home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug-walk/index.js:37:19)\n at load (/home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug-load/index.js:13:10)\n at Function.loadString [as string] (/home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug-load/index.js:46:10)\n at compileBody (/home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug/lib/index.js:86:18)\n at Object.exports.compile (/home/ahmad/code/jsuz/javascript-tutorial-server/node_modules/pug/lib/index.js:242:16)\n at Object.require.extensions..pug (/home/ahmad/code/jsuz/javascript-tutorial-server/modules/lib/serverPug/index.js:13:22)\n at Module.load (module.js:565:32)\n at tryModuleLoad (module.js:505:12)\n at Function.Module._load (module.js:497:3)' ]
(node:25863) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead
[10:30:07] [webpack] Time: 4838ms
Built at: 2018-07-21 10:30:07
Asset Size Chunks Chunk Names
styles/blocks/font/icons.woff 14.6 KiB [emitted]
styles/blocks/font/icons.otf 22.6 KiB [emitted]
styles/blocks/page-footer/slack.svg 1.49 KiB [emitted]
styles.css 85.7 KiB 0 [emitted] styles
styles.js 1.13 KiB 0 [emitted] styles
head.js 18.3 KiB 1 [emitted] head
tutorial.js 34 KiB 2 [emitted] tutorial
footer.js 4.59 KiB 3 [emitted] footer
Entrypoint styles = styles.css styles.js
Entrypoint head = head.js
Entrypoint tutorial = tutorial.js
Entrypoint footer = footer.js
Child mini-css-extract-plugin node_modules/css-loader/index.js??ref--9-1!node_modules/postcss-loader/lib/index.js??ref--9-2!modules/hover-loader.js!node_modules/stylus-loader/index.js??ref--9-4!tmp/styles.styl:
Asset Size Chunks Chunk Names
styles/blocks/font/icons.woff 14.6 KiB [emitted]
styles/blocks/font/icons.otf 22.6 KiB [emitted]
styles/blocks/page-footer/slack.svg 1.49 KiB [emitted]
Entrypoint mini-css-extract-plugin = *
[10:30:07] Finished 'client:webpack' after 5.04 s

Instruction regarding Language-Specific-Repo is not right

In the installation section, at point no 5, it's been said to clone the language repo (for example, bn.javascript.info) in js/server/repo/ directory.
I did so. But when I ran ./edit bn, it was throwing an error that was:

Error: ENOENT: no such file or directory, lstat 'F:\............\js\bn.javascript.info'

Then I cloned the repo again in the js folder. And then my server started running without any problem.
So this is the problem I faced. I think instruction in the readme section should be changed.

Page gets slow and laggy on scrolling to the comments section

Hi, I'm reading the en tutorial and as I'm new to js I couldn't find out the reason for the slow and sluggish behavior in the browser whenever I scroll to the comments section of every tutorial page. But it's there, the cursor stops changing, the waiting circle around the favicon in the tab bar starts to turn and the chrome says do you want to exit the page in a dialogue. So I thought maybe you have an idea how to fix this behavior; maybe by showing the comments on a button click or by reducing the number of requests sent to the server simultaneously when scrolling to the comments section if that's the case.

Thanks for the great tutorial!

Cannot resolve gulp not found on system

Cannot find gulp even after installing with root acess (npm install -g bunyan gulp). The file path exist but the when I run ./edit en or/ ./edit ru it display ./node_modules/.bin/gulp: not found

BUG - ./edit command fails - throwing error - cannot find module 'stylus'

🐞 Bug

Cannot find module 'stylus'

🎯 Context

Execution of server project locally to test site translation initiative

💣 Problem

After cloning the repositories (serve and module and repo) and installing the dependencies, the attempt to execute the command ./edit to load the application ends up failing, as shown in the following log:

♨️  server git:(master) ./edit pt 
[23:39:06] Using gulpfile ~/Desktop/desktop/javascript-info/server/gulpfile.js
[23:39:06] Starting 'edit'...
[23:39:06] Starting 'webpack'...
[23:39:06] Starting 'engine:koa:tutorial:importWatch'...
[23:39:06] Starting 'livereload'...
[23:39:06] Starting 'server'...
Livereload server listening
02:39:08.710Z  INFO application: Boot complete
[23:39:08] 'webpack' errored after 2.6 s
[23:39:08] Error: Cannot find module 'stylus'
Require stack:
- /Users/t719516/Desktop/desktop/javascript-info/server/node_modules/nib/lib/nib.js
- /Users/t719516/Desktop/desktop/javascript-info/server/modules/config/webpack.js
- /Users/t719516/Desktop/desktop/javascript-info/server/modules/config/index.js
- /Users/t719516/Desktop/desktop/javascript-info/server/gulpfile.js
- /Users/t719516/Desktop/desktop/javascript-info/server/node_modules/gulp/node_modules/gulp-cli/lib/shared/require-or-import.js
- /Users/t719516/Desktop/desktop/javascript-info/server/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js
- /Users/t719516/Desktop/desktop/javascript-info/server/node_modules/gulp/node_modules/gulp-cli/index.js
- /Users/t719516/Desktop/desktop/javascript-info/server/node_modules/gulp/bin/gulp.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/Users/t719516/Desktop/desktop/javascript-info/server/node_modules/nib/lib/nib.js:11:14)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
[23:39:08] 'edit' errored after 2.6 s

🔍 Reason

The problem is due to the fact that two project libs (nib and stylus-loader) depend on the stylus library, as NPM warns right after installing the dependencies:

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN nib@1.2.0 requires a peer of stylus@* but none is installed. You must install peer dependencies yourself.
npm WARN stylus-loader@3.0.2 requires a peer of stylus@>=0.52.4 but none is installed. You must install peer dependencies yourself.

added 1471 packages from 894 contributors and audited 1475 packages in 392.365s

68 packages are looking for funding
  run `npm fund` for details

found 47 vulnerabilities (37 moderate, 10 high)
  run `npm audit fix` to fix them, or `npm audit` for details

✅ Expected

Execution of the command, without any failure.

🛠️ Solution

Installing the stylusdependency solved the problem.

♨️  server git:(master) npm i stylus
npm WARN deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
+ stylus@0.58.1
added 7 packages from 42 contributors and audited 1482 packages in 10.004s

68 packages are looking for funding
  run `npm fund` for details

found 47 vulnerabilities (37 moderate, 10 high)
  run `npm audit fix` to fix them, or `npm audit` for details
  
♨️  server git:(master) ✗ ./edit en                                                          
[23:53:35] Using gulpfile ~/Desktop/desktop/javascript-info/server/gulpfile.js
[23:53:35] Starting 'edit'...
... LOG OMITTED ...
02:54:02.426Z  INFO importWatch: Import complete

🌍 Environmentl

  • Node: 14.16.1
  • Npm: 6.14.12

🗳️ Suggestion

Add a dependency on the project's package.json.

🏷️ Labels

~Bug ~Dependencies ~Install ~Server

The header overlaps the div.content

Now in all articles the header overlaps the div.content because margin-bottom -30px
server/modules/styles/blocks/main/main.styl

&__header
      margin 20px 0 -30px 0

Installation issue

I step-by-step walked through the installation guide, but it doesn't work. Can you kindly help me figure out what I'm missing? Thanks!!

(node:5834) DeprecationWarning: open() is deprecated in mongoose >= 4.11.0, use openUri() instead, or set the useMongoClient option if using connect() or createConnection(). See http://mongoosejs.com/docs/connections.html#use-mongo-client
[01:00:23] Using gulpfile /js/javascript-tutorial-server/gulpfile.js
[01:00:23] Starting 'dev'...
[01:00:23] Starting 'client:sync-resources'...
[01:00:23] Finished 'client:sync-resources' after 54 ms
[01:00:23] Starting 'nodemon'...
[01:00:23] Starting 'client:livereload'...
[01:00:23] Starting 'client:webpack'...
[01:00:23] Starting 'watch'...
[01:00:24] livereload: listen on change public/pack//.,!public/pack/styles.js,!public/pack/head.js
[01:00:24] Using gulpfile /js/javascript-tutorial-server/gulpfile.js
(node:5835) DeprecationWarning: open() is deprecated in mongoose >= 4.11.0, use openUri() instead, or set the useMongoClient option if using connect() or createConnection(). See http://mongoosejs.com/docs/connections.html#use-mongo-client
[01:00:24] Starting 'worker:nodemon'...
[01:00:25] [nodemon] 1.11.0
[01:00:25] [nodemon] to restart at any time, enter rs
[01:00:25] [nodemon] watching: /js/javascript-tutorial-server/handlers/
/* /js/javascript-tutorial-server/modules/**/*
[01:00:25] [nodemon] starting node ./bin/server.js
[01:00:25] Using gulpfile /js/javascript-tutorial-server/gulpfile.js
(node:5836) DeprecationWarning: open() is deprecated in mongoose >= 4.11.0, use openUri() instead, or set the useMongoClient option if using connect() or createConnection(). See http://mongoosejs.com/docs/connections.html#use-mongo-client
[01:00:25] Starting 'worker:client:webpack'...
[01:00:25] 'worker:client:webpack' errored after 83 ms
[01:00:25] Error: ENOENT: no such file or directory, open '/js/javascript-tutorial-server/tmp/styles.styl'
at Error (native)
at Object.fs.openSync (fs.js:641:18)
at Object.fs.writeFileSync (fs.js:1347:33)
at Compiler. (/js/javascript-tutorial-server/modules/config/webpack.js:193:12)
at Compiler.apply (/js/javascript-tutorial-server/node_modules/tapable/lib/Tapable.js:164:16)
at OptionsApply.WebpackOptionsApply.process (/js/javascript-tutorial-server/node_modules/webpack/lib/WebpackOptionsApply.js:62:18)
at webpack (/js/javascript-tutorial-server/node_modules/webpack/lib/webpack.js:22:48)
at /js/javascript-tutorial-server/tasks/webpack.js:11:5
at Gulp. (/js/javascript-tutorial-server/gulpfile.js:33:12)
at module.exports (/js/javascript-tutorial-server/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/js/javascript-tutorial-server/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/js/javascript-tutorial-server/node_modules/orchestrator/index.js:214:10)
at Gulp.Orchestrator.start (/js/javascript-tutorial-server/node_modules/orchestrator/index.js:134:8)
at /js/javascript-tutorial-server/node_modules/gulp/bin/gulp.js:129:20
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
Gulp error details [ 'ENOENT: no such file or directory, open '/js/javascript-tutorial-server/tmp/styles.styl'',
'Error: ENOENT: no such file or directory, open '/js/javascript-tutorial-server/tmp/styles.styl'\n at Error (native)\n at Object.fs.openSync (fs.js:641:18)\n at Object.fs.writeFileSync (fs.js:1347:33)\n at Compiler. (/js/javascript-tutorial-server/modules/config/webpack.js:193:12)\n at Compiler.apply (/js/javascript-tutorial-server/node_modules/tapable/lib/Tapable.js:164:16)\n at OptionsApply.WebpackOptionsApply.process (/js/javascript-tutorial-server/node_modules/webpack/lib/WebpackOptionsApply.js:62:18)\n at webpack (/js/javascript-tutorial-server/node_modules/webpack/lib/webpack.js:22:48)\n at /js/javascript-tutorial-server/tasks/webpack.js:11:5\n at Gulp. (/js/javascript-tutorial-server/gulpfile.js:33:12)\n at module.exports (/js/javascript-tutorial-server/node_modules/orchestrator/lib/runTask.js:34:7)\n at Gulp.Orchestrator._runTask (/js/javascript-tutorial-server/node_modules/orchestrator/index.js:273:3)\n at Gulp.Orchestrator._runStep (/js/javascript-tutorial-server/node_modules/orchestrator/index.js:214:10)\n at Gulp.Orchestrator.start (/js/javascript-tutorial-server/node_modules/orchestrator/index.js:134:8)\n at /js/javascript-tutorial-server/node_modules/gulp/bin/gulp.js:129:20\n at _combinedTickCallback (internal/process/next_tick.js:73:7)\n at process._tickCallback (internal/process/next_tick.js:104:9)' ]
[01:00:25] 'client:webpack' errored after 1.56 s
[01:00:25] Error in plugin 'll'
Message:
Task ll:client:webpack failed
[01:00:25] 'dev' errored after 1.9 s
[01:00:25] Error in plugin 'run-sequence(client:webpack)'
Error
at finish (/js/javascript-tutorial-server/node_modules/run-sequence/index.js:56:13)
at Gulp.onError (/js/javascript-tutorial-server/node_modules/run-sequence/index.js:67:4)
at emitOne (events.js:101:20)
at Gulp.emit (events.js:188:7)
at Gulp.Orchestrator._emitTaskDone (/js/javascript-tutorial-server/node_modules/orchestrator/index.js:264:8)
at /js/javascript-tutorial-server/node_modules/orchestrator/index.js:275:23
at finish (/js/javascript-tutorial-server/node_modules/orchestrator/lib/runTask.js:21:8)
at /js/javascript-tutorial-server/node_modules/orchestrator/lib/runTask.js:45:4
at process._tickCallback (internal/process/next_tick.js:109:7)
Gulp error details [ 'Task ll:client:webpack failed' ]
Gulp error details [ 'Task ll:client:webpack failed' ]

Cannot find module 'translate'

$ ./edit en
[08:40:52] Using gulpfile ~/Downloads/test/js/server/gulpfile.js
[08:40:52] Starting 'webpack'...
[08:40:55] Starting 'engine:koa:tutorial:importWatch'...
[08:40:55] Starting 'livereload'...
[08:40:55] Starting 'server'...
[08:40:55] 'server' errored after 143 ms
[08:40:55] Error: Cannot find module 'translate'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
    at Function.Module._load (internal/modules/cjs/loader.js:529:25)
    at Module.require (internal/modules/cjs/loader.js:658:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/colin/Downloads/test/js/server/modules/engine/koa/tutorial/controller/task.js:8:23)
    at Module._compile (internal/modules/cjs/loader.js:722:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Module.require (internal/modules/cjs/loader.js:658:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/colin/Downloads/test/js/server/modules/engine/koa/tutorial/router.js:5:12)
    at Module._compile (internal/modules/cjs/loader.js:722:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Module.require (internal/modules/cjs/loader.js:658:17)
    at module.exports (/Users/colin/Downloads/test/js/server/modules/engine/koa/lazyRouterMiddleware.js:8:34)
    at module.exports (/Users/colin/Downloads/test/js/server/modules/engine/koa/mountHandlerMiddleware.js:13:63)
    at Object.exports.init (/Users/colin/Downloads/test/js/server/modules/engine/koa/tutorial/index.js:21:11)

When I run ./edit en I got the error above.
Should I need to install translate ?

Problem with "throttle" after reinstall server

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 :

  • npm install (after all steps in the readme)
  • npm run-script build (after this, the css is back, but not the js)

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

Error: Already exists an entry with slug:primitive-conversions-questions

Getting this error when i run the command "edit pt" to start the server

Error: Already exists an entry with slug:primitive-conversions-questions
at TutorialTree.add (C:\Users\Marcell\Documents\Projetos\javascript.info\js\server\modules\engine\koa\tutorial\models\tutorialTree.js:140:13)
at TutorialImporter.syncTask (C:\Users\Marcell\Documents\Projetos\javascript.info\js\server\modules\engine\koa\tutorial\lib\tutorialImporter.js:352:15)
at TutorialImporter.syncArticle (C:\Users\Marcell\Documents\Projetos\javascript.info\js\server\modules\engine\koa\tutorial\lib\tutorialImporter.js:240:20)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async TutorialImporter.syncFolder (C:\Users\Marcell\Documents\Projetos\javascript.info\js\server\modules\engine\koa\tutorial\lib\tutorialImporter.js:150:9)
at async TutorialImporter.syncFolder (C:\Users\Marcell\Documents\Projetos\javascript.info\js\server\modules\engine\koa\tutorial\lib\tutorialImporter.js:148:9)
at async TutorialImporter.sync (C:\Users\Marcell\Documents\Projetos\javascript.info\js\server\modules\engine\koa\tutorial\lib\tutorialImporter.js:85:5)
at async module.exports (C:\Users\Marcell\Documents\Projetos\javascript.info\js\server\modules\engine\koa\tutorial\tasks\importWatch.js:32:5)
[21:51:44] 'edit' errored after 6.47

What could be happening?

Cannot start the server

I'm following the running instructions very closely. The only deviations are:

  • I used a custom directory instead of /js, making sure to substitute it in all the commands
  • I use the Node provided by pnpm (the pnpm env command that installs and links a desired version of Node and npm)

Upon running ./edit en I get the following error:

Error log
[17:21:41] Using gulpfile ~/work/javascript-info/server/gulpfile.js
[17:21:41] Starting 'edit'...
[17:21:41] Starting 'webpack'...
[17:21:41] Starting 'engine:koa:tutorial:importWatch'...
[17:21:41] Starting 'livereload'...
[17:21:41] Starting 'server'...
(node:10406) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
Livereload server listening
[17:21:42] 'engine:koa:tutorial:importWatch' errored after 1.74 s
[17:21:42] Error: Cannot find module '@trysound/sax'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/illright/work/javascript-info/server/modules/engine/koa/tutorial/lib/figuresImporter.js:12:13)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/home/illright/work/javascript-info/server/modules/engine/koa/tutorial/tasks/importWatch.js:4:23)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at /home/illright/work/javascript-info/server/modules/engine/gulp/requireModuleTasks.js:10:16
    at taskWrapper (/home/illright/work/javascript-info/server/node_modules/undertaker/lib/set-task.js:13:15)
[17:21:42] 'edit' errored after 1.75 s

I wanted to see what would happen if I ran npm install @trysound/sax --save, then this error appeared:

Error log
[17:12:58] Using gulpfile ~/work/javascript-info/js/server/gulpfile.js
[17:12:58] Starting 'edit'...
[17:12:58] Starting 'webpack'...
[17:12:58] Starting 'engine:koa:tutorial:importWatch'...
[17:12:58] Starting 'livereload'...
[17:12:58] Starting 'server'...
(node:9293) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:9293) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:9293) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:9293) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:9293) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:9293) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:9293) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
Livereload server listening
[17:12:59] 'engine:koa:tutorial:importWatch' errored after 1.49 s
[17:12:59] Error: Cannot find module 'client/init/light2dark'
Require stack:
- /home/illright/work/javascript-info/js/server/modules/engine/koa/tutorial/lib/figuresImporter.js
- /home/illright/work/javascript-info/js/server/modules/engine/koa/tutorial/tasks/importWatch.js
- /home/illright/work/javascript-info/js/server/modules/engine/gulp/requireModuleTasks.js
- /home/illright/work/javascript-info/js/server/gulpfile.js
- /home/illright/work/javascript-info/js/server/node_modules/gulp-cli/lib/shared/require-or-import.js
- /home/illright/work/javascript-info/js/server/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js
- /home/illright/work/javascript-info/js/server/node_modules/gulp-cli/index.js
- /home/illright/work/javascript-info/js/server/node_modules/gulp/bin/gulp.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/illright/work/javascript-info/js/server/modules/engine/koa/tutorial/lib/figuresImporter.js:13:20)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/illright/work/javascript-info/js/server/modules/engine/koa/tutorial/tasks/importWatch.js:4:23)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at /home/illright/work/javascript-info/js/server/modules/engine/gulp/requireModuleTasks.js:10:16
    at taskWrapper (/home/illright/work/javascript-info/js/server/node_modules/undertaker/lib/set-task.js:13:15)
    at bound (node:domain:421:15)
    at runBound (node:domain:432:12)
[17:12:59] 'edit' errored after 1.5 s

On an unrelated note: have there been any efforts to modernize the tech stack of this website? The build process feels a bit cumbersome, and I wonder if we could remedy that with modern build tools and frameworks

Ошибка в названии директории engine

В инструкции прописана директория engine, но по всему проекту во многих местах прописано jsengine, из-за чего сервер не запускается.

git clone https://github.com/javascript-tutorial/engine server/modules/engine

Edit server doesn't run

I use this feature (edit) for offline learning JS. So after installation a new node and gulp I got this error:
'edit' errored after 946 ms The following tasks did not complete: webpack, livereload, server Did you forget to signal async completion?

There is any problem with my gulp version?
2020-3-17 18-4-26

Server is running but SVG won't appear

$ node -v
v11.14.0

OS is Windows 10, but managed to run some commands on GIT BASH.

Ok so server is running the translated cloned repo from es.javascript.info; when open with http://localhost:3000/coding-style (for example) there is a SVG file and this message appears:

/article/coding-style/code-style.svg: Could not execute GraphicsMagick/ImageMagick: identify "-ping" "-format" "{"width":%w,"height":%h}" "C:\Users\ezzep\js\server\public\en\article\coding-style\code-style.svg" this most likely means the gm/convert binaries can't be found

GraphicsMagick has been correctly installed and confirmed installation with the following command:

You have now installed GraphicsMagick. To test the installation select "Command Prompt" from the Windows Start menu. Within the window that appears type:
gm convert logo: logo.jpg
gm convert logo.jpg win:
and the GraphicsMagick logo should be displayed in a window.

GraphicsMagick logo appears OK

following instructions from https://github.com/javascript-tutorial/server

run command with BASH ./edit es
everything OK

Step 3. Run the translation task:

cd /js/server # in the server folder
# adjust NODE_LANG to your language
NODE_LANG=es glp engine:koa:tutorial:figuresTranslate

glp command not found, Replaced with npm run gulp --

NODE_LANG=es npm run gulp -- engine:koa:tutorial:figuresTranslate --image code-style.svg

> [email protected] gulp C:\Users\ezzep\js\server
> cross-env NODE_PRESERVE_SYMLINKS=1 NODE_PATH=./modules ./node_modules/.bin/gulp "engine:koa:tutorial:figuresTranslate" "--image" "code-style.svg"

[12:27:12] Using gulpfile ~\js\server\gulpfile.js
[12:27:12] Starting 'engine:koa:tutorial:figuresTranslate'...
Image 1-js/03-code-quality/02-coding-style/code-style.svg
[12:27:13] 'engine:koa:tutorial:figuresTranslate' errored after 638 ms
[12:27:13] Error: Command failed: convert -debug annotate xc: -font C:\Users\ezzep\js\server\modules\engine\koa\tutorial\resources\OpenSans-Bold.ttf -pointsize 14 -annotate 0 "No space" null: 2>&1
    at checkExecSyncError (child_process.js:630:11)
    at execSync (child_process.js:666:15)
    at pixelWidth (C:\Users\ezzep\js\server\modules\engine\koa\tutorial\lib\pixelWidth.js:11:16)
    at C:\Users\ezzep\js\server\modules\engine\koa\tutorial\tasks\figuresTranslate.js:156:31
    at String.replace (<anonymous>)
    at module.exports (C:\Users\ezzep\js\server\modules\engine\koa\tutorial\tasks\figuresTranslate.js:103:25)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] gulp: `cross-env NODE_PRESERVE_SYMLINKS=1 NODE_PATH=./modules ./node_modules/.bin/gulp "engine:koa:tutorial:figuresTranslate" "--image" "code-style.svg"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] gulp script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ezzep\AppData\Roaming\npm-cache\_logs\2020-08-14T15_27_13_429Z-debug.log
[2020-08-14T15_27_13_429Z-debug.log](https://github.com/javascript-tutorial/server/files/5075443/2020-08-14T15_27_13_429Z-debug.log)

Cannot start the server

Hello,

I cannot make the server start. I'm using a fresh Ubuntu 18.04 with node version 10.22.1 and npm version 6.14.6. All the commands that I have run are:

npm install -g bunyan gulp@4
cd /js
git clone https://github.com/javascript-tutorial/server
git clone https://github.com/javascript-tutorial/engine server/modules/engine
cd /js
git clone https://github.com/javascript-tutorial/en.javascript.info
cd /js/server
npm install
./edit en

All commands ran successfully except for the last one. I got the following messages:

[03:51:53] Using gulpfile /js/server/gulpfile.js
[03:51:53] Starting 'edit'...
[03:51:53] Starting 'webpack'...
[03:51:53] Starting 'engine:koa:tutorial:importWatch'...
[03:51:53] Starting 'livereload'...
[03:51:53] Starting 'server'...
(node:19713) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
Livereload server listening

... Uhoh. Got error listen EADDRINUSE: address already in use :::35729 ...
Error: listen EADDRINUSE: address already in use :::35729
    at Server.setupListenHandle [as _listen2] (net.js:1280:14)
    at listenInCluster (net.js:1328:12)
    at Server.listen (net.js:1415:7)
    at Server.listen (/js/server/node_modules/tiny-lr/src/server.js:264:19)
    at Function.exports.listen (/js/server/node_modules/gulp-livereload/index.js:97:18)
    at module.exports (/js/server/tasks/livereload.js:12:14)
    at /js/server/modules/engine/gulp/requireModuleTasks.js:11:12
    at taskWrapper (/js/server/node_modules/undertaker/lib/set-task.js:13:15)
    at bound (domain.js:402:14)
    at runBound (domain.js:415:12)
    at asyncRunner (/js/server/node_modules/async-done/index.js:55:18)
    at process._tickCallback (internal/process/next_tick.js:61:11)

You already have a server listening on 35729
You should stop it and try again.

[03:51:55] 'server' errored after 1.79 s
[03:51:55] Error: Cannot find module 'csrf'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/js/server/modules/engine/koa/application.js:23:14)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/js/server/modules/engine/koa/app.js:6:21)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/js/server/tasks/server.js:1:11)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
[03:51:55] 'edit' errored after 1.8 s

The /js folder contains en.javascript.info and server.

Please help me. I need this server software to verify the result of merging the latest codes from the en.javascript.info repository to the vi.javascript.info repository.

Cannot start server

This issue ocurrs when trying to start server:

└─[$]> PORT=1236 ./edit uk
[12:58:01] Using gulpfile ~/projects/translations/javascript-tutorial/server/gulpfile.js
[12:58:01] Starting 'edit'...
[12:58:01] Starting 'webpack'...
[12:58:01] Starting 'engine:koa:tutorial:importWatch'...
[12:58:01] Starting 'livereload'...
[12:58:01] Starting 'server'...
(node:2711) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2711) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:2711) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:2711) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:2711) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:2711) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
Livereload server listening

... Uhoh. Got error listen EADDRINUSE: address already in use :::35729 ...
Error: listen EADDRINUSE: address already in use :::35729
    at Server.setupListenHandle [as _listen2] (net.js:1314:16)
    at listenInCluster (net.js:1362:12)
    at Server.listen (net.js:1448:7)
    at Server.listen (/Users/tarasyyyk/projects/translations/javascript-tutorial/server/node_modules/tiny-lr/src/server.js:264:19)
    at Function.exports.listen (/Users/tarasyyyk/projects/translations/javascript-tutorial/server/node_modules/gulp-livereload/index.js:97:18)
    at module.exports (/Users/tarasyyyk/projects/translations/javascript-tutorial/server/tasks/livereload.js:12:14)
    at /Users/tarasyyyk/projects/translations/javascript-tutorial/server/modules/engine/gulp/requireModuleTasks.js:11:12
    at livereload (/Users/tarasyyyk/projects/translations/javascript-tutorial/server/node_modules/undertaker/lib/set-task.js:13:15)
    at bound (domain.js:429:14)
    at runBound (domain.js:442:12)
    at asyncRunner (/Users/tarasyyyk/projects/translations/javascript-tutorial/server/node_modules/async-done/index.js:55:18)
    at processTicksAndRejections (internal/process/task_queues.js:79:11)

You already have a server listening on 35729
You should stop it and try again.

09:58:02.992Z  INFO application: Boot complete
[12:58:02] 'webpack' errored after 1.49 s
[12:58:02] ValidationError: Invalid options object. Ignore Plugin has been initialized using an options object that does not match the API schema.
 - options should be one of these:
   object { contextRegExp?, resourceRegExp? } | object { checkResource? }
   Details:
    * options has an unknown property 'checkResource'. These properties are valid:
      object { contextRegExp?, resourceRegExp? }
    * options has an unknown property 'checkContext'. These properties are valid:
      object { contextRegExp?, resourceRegExp? }
    * options has an unknown property 'checkContext'. These properties are valid:
      object { checkResource? }
    at validate (/Users/tarasyyyk/projects/translations/javascript-tutorial/server/node_modules/webpack/node_modules/schema-utils/dist/validate.js:104:11)
    at new IgnorePlugin (/Users/tarasyyyk/projects/translations/javascript-tutorial/server/node_modules/webpack/lib/IgnorePlugin.js:20:3)
    at Object.module.exports [as webpack] (/Users/tarasyyyk/projects/translations/javascript-tutorial/server/modules/config/webpack.js:272:7)
    at /Users/tarasyyyk/projects/translations/javascript-tutorial/server/tasks/webpack.js:7:36
    at new Promise (<anonymous>)
    at module.exports (/Users/tarasyyyk/projects/translations/javascript-tutorial/server/tasks/webpack.js:6:9)
    at /Users/tarasyyyk/projects/translations/javascript-tutorial/server/modules/engine/gulp/requireModuleTasks.js:11:12
    at webpack (/Users/tarasyyyk/projects/translations/javascript-tutorial/server/node_modules/undertaker/lib/set-task.js:13:15)
    at bound (domain.js:429:14)
    at runBound (domain.js:442:12)
    at asyncRunner (/Users/tarasyyyk/projects/translations/javascript-tutorial/server/node_modules/async-done/index.js:55:18)
    at processTicksAndRejections (internal/process/task_queues.js:79:11)
[12:58:02] 'edit' errored after 1.5 s

I see an error You already have a server listening on 35729. But I specifically changed port in env variable.
Also, I checked this port with command sudo lsof -i -n -P | grep 35729 and it port isn't using in my system.

System info:
node v.14.2
macOS 10.14.6

Server not working!

This is what I get when I do ./edit en.

YError: Invalid second argument. Expected string or boolean but received object.
    at argumentTypeError (/Users/x/javascript-tutorial/server/node_modules/.pnpm/node_modules/yargs/lib/argsert.js:67:9)
    at /Users/x/javascript-tutorial/server/node_modules/.pnpm/node_modules/yargs/lib/argsert.js:49:39
    at Array.forEach (<anonymous>)
    at argsert (/Users/x/javascript-tutorial/server/node_modules/.pnpm/node_modules/yargs/lib/argsert.js:44:21)
    at Object.Yargs.self.usage (/Users/x/javascript-tutorial/server/node_modules/.pnpm/node_modules/yargs/yargs.js:455:5)
    at Object.<anonymous> (/Users/x/javascript-tutorial/server/node_modules/.pnpm/[email protected]/node_modules/gulp-cli/index.js:61:20)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)

/Users/x/javascript-tutorial/server/node_modules/.pnpm/node_modules/yargs/yargs.js:463
        throw new YError('.usage() description must start with $0 if being used as alias for .command()')
        ^
YError: .usage() description must start with $0 if being used as alias for .command()
    at Object.Yargs.self.usage (/Users/x/javascript-tutorial/server/node_modules/.pnpm/node_modules/yargs/yargs.js:463:15)
    at Object.<anonymous> (/Users/x/javascript-tutorial/server/node_modules/.pnpm/[email protected]/node_modules/gulp-cli/index.js:61:20)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/Users/x/javascript-tutorial/server/node_modules/.pnpm/[email protected]/node_modules/gulp/bin/gulp.js:3:1)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)

Can't run server.

I've updated (git pull) local repository of server and english frontend. After updating sever not run with error (windows):

Untitled-1
`
PS E:\js\server> ./edit en en

E:\js\server>call gulp edit | bunyan
Cannot read property 'tasks' of undefined TypeError: Cannot read property 'tasks' of undefined
at Orchestrator.add (E:\js\server\node_modules\orchestrator\index.js:54:8)
at Object. (E:\js\server\gulpfile.js:21:1)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at execute (C:\Users\w4\AppData\Roaming\npm\node_modules\gulp-cli\lib\versioned^3.7.0\index.js:28:18) undefined

E:\js\server>goto :eof
`

Can't start server

I followed instruction in README.
When I'm trying to start server with code
w4@MSI MINGW64 /e/js/server (master) $ ./edit en
I got this error (as well as for "./edit ru ru"):
'NODE_PRESERVE_SYMLINKS' is not recognized as an internal or external command, operable program or batch file.

About Deployment

Hello @iliakan

,

Thanks for this server. I did exactly what you said and except one problem I was able to install i think there is a problem with bemto.pug and node v8.11.4. After I fixed the issue I was able to run the project by ./edit tr and I think it worked. I said I think because there is no signal about it. You can see it in attachment

this is my console, as you see I give permission to 3000 port.

gcloud2

And this is what it seems like at the end of ./edit tr

gcloud

I thought I should be able to reach this code by http://my-ip:3000

Is there anything that I need to do ?

Thanks.

can't run service

╰─ ./edit en ─╯
internal/modules/cjs/loader.js:638
throw err;
^

Error: Cannot find module '..'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/home/iomari/git-repos/javascript.info/server/node_modules/.bin/cross-env:4:16)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)

[Bug report] - local server error due to "js-yaml" update

Hello! I found there's a problem with running tutorial server.
By following this server guide, I should encounter this error, "Function yaml.safeLoad is removed in js-yaml 4."...

Printing Error with current guide

image

I think server code should be modified, or using the old version of "js-yaml".

After replacing "js-yaml" to old version(3.14.1)

image

How about replacing "js-yaml": "*" to "js-yaml" : "3.14.1" in package.json?

Dockerize server

This is feature request:
Made server to run in docker (with docker-compose.yml file)

Failed to @extend "$font-burger"

Failed to @extend "$font-burger"

---- OS: Ubuntu 21.10 Codename: impish

---- node: v16.13.1 (also v12.22.5 gives same arror)

---- invocation script on PWD=/zz/repo/mjt

MJTDIR=/zz/repo/mjt/server

export P=4570

( cd $MJTDIR &&
PORT=$P ./edit en
) 2>&1 | tee .server-error-report

---- log output:

[01:56:49] Using gulpfile /zz/repo/mjt/server/gulpfile.js
[01:56:49] Starting 'edit'...
[01:56:49] Starting 'webpack'...
[01:56:49] Starting 'engine:koa:tutorial:importWatch'...
[01:56:49] Starting 'livereload'...
[01:56:49] Starting 'server'...
(node:24574) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
(node:24574) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:24574) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:24574) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:24574) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:24574) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:24574) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead
Livereload server listening
23:56:56.015Z INFO application: Boot complete
23:56:56.145Z INFO application: Server is listening localhost:4570
[01:56:56] Finished 'server' after 6.88 s
23:56:56.248Z INFO tutorialImporter: sync /zz/repo/mjt/server/repo/en.javascript.info/1-js
/zz/repo/mjt/server/repo/en.javascript.info/1-js /zz/repo/mjt/server/repo/en.javascript.info
23:56:56.250Z INFO tutorialImporter: syncFolder /zz/repo/mjt/server/repo/en.javascript.info/1-js
23:56:56.253Z INFO tutorialImporter: syncFolder /zz/repo/mjt/server/repo/en.javascript.info/1-js/01-getting-started
23:56:56.255Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/01-getting-started/1-intro
23:56:56.374Z INFO tutorialImporter: importImage /zz/repo/mjt/server/repo/en.javascript.info/1-js/01-getting-started/1-intro/limitations.svg to /zz/repo/mjt/server/public/en/article/intro
23:56:56.380Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/01-getting-started/2-manuals-specifications
23:56:56.438Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/01-getting-started/3-code-editors
23:56:56.488Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/01-getting-started/4-devtools
23:56:56.556Z INFO tutorialImporter: importImage /zz/repo/mjt/server/repo/en.javascript.info/1-js/01-getting-started/4-devtools/chrome.png to /zz/repo/mjt/server/public/en/article/devtools
23:56:56.561Z INFO tutorialImporter: importImage /zz/repo/mjt/server/repo/en.javascript.info/1-js/01-getting-started/4-devtools/[email protected] to /zz/repo/mjt/server/public/en/article/devtools
23:56:56.567Z INFO tutorialImporter: importImage /zz/repo/mjt/server/repo/en.javascript.info/1-js/01-getting-started/4-devtools/safari.png to /zz/repo/mjt/server/public/en/article/devtools
23:56:56.572Z INFO tutorialImporter: importImage /zz/repo/mjt/server/repo/en.javascript.info/1-js/01-getting-started/4-devtools/[email protected] to /zz/repo/mjt/server/public/en/article/devtools
23:56:56.579Z INFO tutorialImporter: syncFolder /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps
23:56:56.581Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/01-hello-world
23:56:56.669Z INFO tutorialImporter: syncView: dir /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.view
23:56:56.794Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/02-structure
23:56:57.761Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/03-strict-mode
23:56:57.823Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/04-variables
23:56:57.885Z INFO tutorialImporter: importImage /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/04-variables/variable-change.svg to /zz/repo/mjt/server/public/en/article/variables
23:56:57.888Z INFO tutorialImporter: importImage /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/04-variables/variable.svg to /zz/repo/mjt/server/public/en/article/variables
23:56:57.890Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/05-types
23:56:57.944Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/06-alert-prompt-confirm
23:56:58.115Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/07-type-conversions
23:56:58.169Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/08-operators
23:56:58.237Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/09-comparison
23:56:58.299Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/10-ifelse
23:57:00.866Z INFO tutorialImporter: importImage /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/10-ifelse/2-check-standard/ifelse_task2.svg to /zz/repo/mjt/server/public/en/task/check-standard
23:57:00.877Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/11-logical-operators
23:57:00.972Z INFO tutorialImporter: importImage /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/11-logical-operators/9-check-login/ifelse_task.svg to /zz/repo/mjt/server/public/en/task/check-login
23:57:00.978Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/12-nullish-coalescing-operator
23:57:01.043Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/13-while-for
23:57:01.110Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/14-switch
23:57:01.205Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/15-function-basics
23:57:01.265Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/16-function-expressions
23:57:01.323Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/17-arrow-functions-basics
23:57:01.398Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/02-first-steps/18-javascript-specials
23:57:01.801Z INFO tutorialImporter: syncFolder /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality
23:57:01.802Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/01-debugging-chrome
23:57:01.859Z INFO tutorialImporter: importImage /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/01-debugging-chrome/chrome-open-sources.svg to /zz/repo/mjt/server/public/en/article/debugging-chrome
23:57:01.862Z INFO tutorialImporter: importImage /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/01-debugging-chrome/chrome-sources-breakpoint.svg to /zz/repo/mjt/server/public/en/article/debugging-chrome
23:57:01.865Z INFO tutorialImporter: importImage /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/01-debugging-chrome/chrome-sources-console.svg to /zz/repo/mjt/server/public/en/article/debugging-chrome
23:57:01.869Z INFO tutorialImporter: importImage /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/01-debugging-chrome/chrome-sources-debugger-pause.svg to /zz/repo/mjt/server/public/en/article/debugging-chrome
23:57:01.872Z INFO tutorialImporter: importImage /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/01-debugging-chrome/chrome-sources-debugger-trace-1.svg to /zz/repo/mjt/server/public/en/article/debugging-chrome
23:57:01.875Z INFO tutorialImporter: importImage /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/01-debugging-chrome/chrome-tabs.svg to /zz/repo/mjt/server/public/en/article/debugging-chrome
23:57:01.878Z INFO tutorialImporter: syncView: dir /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/01-debugging-chrome/debugging.view
23:57:02.660Z INFO tutorialImporter: importImage /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/01-debugging-chrome/largeIcons.svg to /zz/repo/mjt/server/public/en/article/debugging-chrome
23:57:02.662Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/02-coding-style
23:57:03.396Z INFO tutorialImporter: importImage /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/02-coding-style/code-style.svg to /zz/repo/mjt/server/public/en/article/coding-style
23:57:03.399Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/03-comments
23:57:03.454Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/04-ninja-code
23:57:03.512Z INFO tutorialImporter: syncArticle /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/05-testing-mocha
23:57:03.687Z INFO tutorialImporter: syncView: dir /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/05-testing-mocha/beforeafter.view
23:57:06.839Z INFO tutorialImporter: syncView: dir /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/05-testing-mocha/pow-1.view
23:57:07.872Z INFO tutorialImporter: syncView: dir /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/05-testing-mocha/pow-2.view
23:57:08.216Z INFO tutorialImporter: syncView: dir /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/05-testing-mocha/pow-3.view
23:57:08.491Z INFO tutorialImporter: syncView: dir /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/05-testing-mocha/pow-4.view
23:57:08.621Z INFO tutorialImporter: syncView: dir /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/05-testing-mocha/pow-full.view
23:57:08.947Z INFO tutorialImporter: syncView: dir /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/05-testing-mocha/pow-min.view
23:57:10.137Z INFO tutorialImporter: syncView: dir /zz/repo/mjt/server/repo/en.javascript.info/1-js/03-code-quality/05-testing-mocha/pow-nan.view
./tmp/en/styles.styl
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/stylus-loader/index.js):
Error: /zz/repo/mjt/server/tmp/en/styles.styl:121:13

Failed to @extend "$font-burger"

at /zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:408:19
at Array.forEach (<anonymous>)
at Normalizer.extend (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:402:17)
at Normalizer.visitGroup (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:279:8)
at Normalizer.Visitor.visit (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.visitBlock (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:232:27)
at Normalizer.Visitor.visit (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.extend (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:426:22)
at Normalizer.visitGroup (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:279:8)
at Normalizer.Visitor.visit (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.visitBlock (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:232:27)
at Normalizer.Visitor.visit (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.visitBlock (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:232:27)
at Normalizer.Visitor.visit (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.visitBlock (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:232:27)
at Normalizer.Visitor.visit (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.visitBlock (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:232:27)
at Normalizer.Visitor.visit (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.visitRoot (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:170:23)
at Normalizer.Visitor.visit (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.normalize (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:53:18)
at Renderer.render (/zz/repo/mjt/server/node_modules/stylus/lib/renderer.js:90:22)
at /zz/repo/mjt/server/node_modules/webpack/lib/NormalModule.js:316:20
at /zz/repo/mjt/server/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /zz/repo/mjt/server/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/zz/repo/mjt/server/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /zz/repo/mjt/server/node_modules/stylus-loader/index.js:169:11
at Renderer.render (/zz/repo/mjt/server/node_modules/stylus/lib/renderer.js:107:12)
at /zz/repo/mjt/server/node_modules/stylus-loader/index.js:167:12
at tryCatchReject (/zz/repo/mjt/server/node_modules/when/lib/makePromise.js:840:30)
at runContinuation1 (/zz/repo/mjt/server/node_modules/when/lib/makePromise.js:799:4)
at Fulfilled.when (/zz/repo/mjt/server/node_modules/when/lib/makePromise.js:590:4)
at Pending.run (/zz/repo/mjt/server/node_modules/when/lib/makePromise.js:481:13)
at Scheduler._drain (/zz/repo/mjt/server/node_modules/when/lib/Scheduler.js:62:19)
at Scheduler.drain (/zz/repo/mjt/server/node_modules/when/lib/Scheduler.js:27:9)
at processTicksAndRejections (node:internal/process/task_queues:78:11)

[01:57:10] 'webpack' errored after 21 s
[01:57:10] Error: ./tmp/en/styles.styl
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/stylus-loader/index.js):
Error: /zz/repo/mjt/server/tmp/en/styles.styl:121:13

Failed to @extend "$font-burger"

at /zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:408:19
at Array.forEach (<anonymous>)
at Normalizer.extend (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:402:17)
at Normalizer.visitGroup (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:279:8)
at Normalizer.Visitor.visit (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.visitBlock (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:232:27)
at Normalizer.Visitor.visit (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.extend (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:426:22)
at Normalizer.visitGroup (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:279:8)
at Normalizer.Visitor.visit (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.visitBlock (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:232:27)
at Normalizer.Visitor.visit (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.visitBlock (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:232:27)
at Normalizer.Visitor.visit (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.visitBlock (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:232:27)
at Normalizer.Visitor.visit (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.visitBlock (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:232:27)
at Normalizer.Visitor.visit (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.visitRoot (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:170:23)
at Normalizer.Visitor.visit (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/index.js:28:40)
at Normalizer.normalize (/zz/repo/mjt/server/node_modules/stylus/lib/visitor/normalizer.js:53:18)
at Renderer.render (/zz/repo/mjt/server/node_modules/stylus/lib/renderer.js:90:22)
at /zz/repo/mjt/server/node_modules/webpack/lib/NormalModule.js:316:20
at /zz/repo/mjt/server/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /zz/repo/mjt/server/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/zz/repo/mjt/server/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /zz/repo/mjt/server/node_modules/stylus-loader/index.js:169:11
at Renderer.render (/zz/repo/mjt/server/node_modules/stylus/lib/renderer.js:107:12)
at /zz/repo/mjt/server/node_modules/stylus-loader/index.js:167:12
at tryCatchReject (/zz/repo/mjt/server/node_modules/when/lib/makePromise.js:840:30)
at runContinuation1 (/zz/repo/mjt/server/node_modules/when/lib/makePromise.js:799:4)
at Fulfilled.when (/zz/repo/mjt/server/node_modules/when/lib/makePromise.js:590:4)
at Pending.run (/zz/repo/mjt/server/node_modules/when/lib/makePromise.js:481:13)
at Scheduler._drain (/zz/repo/mjt/server/node_modules/when/lib/Scheduler.js:62:19)
at Scheduler.drain (/zz/repo/mjt/server/node_modules/when/lib/Scheduler.js:27:9)
at processTicksAndRejections (node:internal/process/task_queues:78:11)
at formatError (/zz/repo/mjt/server/node_modules/gulp-cli/lib/versioned/^4.0.0/format-error.js:21:10)
at Gulp.<anonymous> (/zz/repo/mjt/server/node_modules/gulp-cli/lib/versioned/^4.0.0/log/events.js:33:15)
at Gulp.emit (node:events:402:35)
at Gulp.emit (node:domain:475:12)
at Object.error (/zz/repo/mjt/server/node_modules/undertaker/lib/helpers/createExtensions.js:61:10)
at handler (/zz/repo/mjt/server/node_modules/now-and-later/lib/map.js:50:14)
at f (/zz/repo/mjt/server/node_modules/once/once.js:25:25)
at f (/zz/repo/mjt/server/node_modules/once/once.js:25:25)
at tryCatch (/zz/repo/mjt/server/node_modules/async-done/index.js:24:15)
at done (/zz/repo/mjt/server/node_modules/async-done/index.js:40:12)
at onError (/zz/repo/mjt/server/node_modules/async-done/index.js:51:5)

[01:57:10] 'edit' errored after 21 s

Installation Issue

I am getting this error while I run to execute the code

'worker:client:webpack' errored
Error: ENOENT: no such file or directory, open '..../js/javascript-tutorial-server/tmp/styles.styl'

Gulp error details
Error: ENOENT: no such file or directory, open '..../js/javascript-tutorial-server/tmp/styles.styl'
Error in plugin 'll'

(node:16057) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:16061) DeprecationWarning: open() is deprecated in mongoose >= 4.11.0, use openUri() instead, or set the useMongoClient option if using connect() or createConnection(). See http://mongoosejs.com/docs/connections.html#use-mongo-client
events.js:182
throw er; // Unhandled 'error' event
^

Error: listen EACCES 127.0.0.1:80

BUG - error loading application based on pt.javascript.info repository

🐞 Bug:

ERROR tutorialTree

🎯 Context

Execution of the server project locally to test the website translation initiative into Portuguese

💣 Problem

The ./edit pt command to load the application ends up failing, as shown in the following log:

♨️  server git:(master) ✗ ./edit pt      
[23:47:13] Using gulpfile ~/Desktop/desktop/javascript-info/server/gulpfile.js
[23:47:13] Starting 'edit'...
[23:47:13] Starting 'webpack'...
[23:47:13] Starting 'engine:koa:tutorial:importWatch'...
[23:47:13] Starting 'livereload'...
[23:47:13] Starting 'server'...

... LOG OMITTED ...

02:47:25.750Z ERROR tutorialTree:
    Dupe entry Task {
      title: 'Type conversions',
      slug: 'primitive-conversions-questions',
      githubPath: '/1-js/02-first-steps/08-operators/3-primitive-conversions-questions',
      weight: 3,
      libs: [],
      importance: 5,
      content: '\n' +
        '\n' +
        'What are results of these expressions?\n' +
        '\n' +
        '```js no-beautify\n' +
        '"" + 1 + 0\n' +
        '"" - 1 + 0\n' +
        'true + false\n' +
        '6 / "3"\n' +
        '"2" * "3"\n' +
        '4 + 5 + "px"\n' +
        '"$" + 4 + 5\n' +
        '"4" - 2\n' +
        '"4px" - 2\n' +
        '"  -9  " + 5\n' +
        '"  -9  " - 5\n' +
        'null + 1\n' +
        'undefined + 1\n' +
        '" \\t \\n" - 2\n' +
        '```\n' +
        '\n' +
        'Think well, write down and then compare with the answer.',
      solution: '```js no-beautify\n' +
        '"" + 1 + 0 = "10" // (1)\n' +
        '"" - 1 + 0 = -1 // (2)\n' +
        'true + false = 1\n' +
        '6 / "3" = 2\n' +
        '"2" * "3" = 6\n' +
        '4 + 5 + "px" = "9px"\n' +
        '"$" + 4 + 5 = "$45"\n' +
        '"4" - 2 = 2\n' +
        '"4px" - 2 = NaN\n' +
        '"  -9  " + 5 = "  -9  5" // (3)\n' +
        '"  -9  " - 5 = -14 // (4)\n' +
        'null + 1 = 1 // (5)\n' +
        'undefined + 1 = NaN // (6)\n' +
        '" \\t \\n" - 2 = -2 // (7)\n' +
        '```\n' +
        '\n' +
        '1. The addition with a string `"" + 1` converts `1` to a string: `"" + 1 = "1"`, and then we have `"1" + 0`, the same rule is applied.\n' +
        '2. The subtraction `-` (like most math operations) only works with numbers, it converts an empty string `""` to `0`.\n' +
        '3. The addition with a string appends the number `5` to the string.\n' +
        '4. The subtraction always converts to numbers, so it makes `"  -9  "` a number `-9` (ignoring spaces around it).\n' +
        '5. `null` becomes `0` after the numeric conversion.\n' +
        '6. `undefined` becomes `NaN` after the numeric conversion.\n' +
        '7. Space characters, are trimmed off string start and end when a string is converted to a number. Here the whole string consists of space characters, such as `\\t`, `\\n` and a "regular" space between them. So, similarly to an empty string, it becomes `0`.',
      parent: 'operators',
      version: 1
    }
[23:47:25] 'engine:koa:tutorial:importWatch' errored after 13 s
[23:47:25] Error: Already exists an entry with slug:primitive-conversions-questions
    at TutorialTree.add (/Users/t719516/Desktop/desktop/javascript-info/server/modules/engine/koa/tutorial/models/tutorialTree.js:140:13)
    at TutorialImporter.syncTask (/Users/t719516/Desktop/desktop/javascript-info/server/modules/engine/koa/tutorial/lib/tutorialImporter.js:354:15)
    at TutorialImporter.syncArticle (/Users/t719516/Desktop/desktop/javascript-info/server/modules/engine/koa/tutorial/lib/tutorialImporter.js:242:20)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async TutorialImporter.syncFolder (/Users/t719516/Desktop/desktop/javascript-info/server/modules/engine/koa/tutorial/lib/tutorialImporter.js:152:9)
    at async TutorialImporter.syncFolder (/Users/t719516/Desktop/desktop/javascript-info/server/modules/engine/koa/tutorial/lib/tutorialImporter.js:150:9)
    at async TutorialImporter.sync (/Users/t719516/Desktop/desktop/javascript-info/server/modules/engine/koa/tutorial/lib/tutorialImporter.js:87:5)
    at async module.exports (/Users/t719516/Desktop/desktop/javascript-info/server/modules/engine/koa/tutorial/tasks/importWatch.js:31:5)
[23:47:25] 'edit' errored after 13 s

🔍 Reason

Not identified.

✅ Expected

The expected would be for the application to load based on the desired language repository as in en.

🛠️ Solution

Not identified.

🌍 Environmentl

  • Node: 14.16.1
  • Npm: 6.14.12

🗳️ Suggestion

If there is any necessary step to load a repo from another language, it would be relevant to document in the README file how to proceed.

🏷️ Labels

~Bug ~Language ~Server ~Repo

Improve accessibility

  1. Almost all links with icons do not have accessible name
  2. Search form does not have label
  3. Focused elements are not styled

Server not running

OS: Windows 10
Node: 10.16.0

CMD seems to hang at import complete and nothing is showing up on localhost

suggested: Check broken info: links

Most ## titles have no anchors (no need)
when translated or renamed, we very likely miss the need to check if there is an (info: # ) link referencing it

it shouldnt be difficult to detect

binaries can't be found error

After the pngs are changed svgs, I've got such error.

image

The reason for the error is that the server searches the image files in en directory not ko directory(in my case). You can see the error message on the image.

Dark theme

Maybe I just did not find it, but in theory, the button for switching the theme should be in an obvious easily found place. It would be cool to see a dark version, because at night, a dark editor is perceived nicely, and a bright website mercilessly blinds. No matter what the brightness, in any case, a strong contrast.

I would have done it myself, but I could not figure out how the server works. If I succeed, it will be a good experience.

Trouble installing bunyan gulp and running the server

Hi, I am trying to install npm install -g bunyan gulp but it says deprecated.

I then tried npm install -g bunyan gulp@next and it worked but when I tried ./edit en it shows the following:

./node_modules/.bin/gulp: No such file or directory.

I have searched and tried for at least a couple of hours how to fix it but I've got no success. I must be missing something. Nonetheless I would appreciate any help.

Thanks!

Paulo

./node_modules/.bin/gulp

Hi
I run:
"./edit en"
And get:
sh: ./node_modules/.bin/gulp: No such file or directory

My system is Mac OS 10.14.3
Installed node with nvm
Node version: 11.10.0
nvm version: 0.34.0

English server not running

6.Run the site
Run the site with the same language. Above we cloned ru tutorial, so:
cd /js/javascript-tutorial-server
./edit ru

so while reaching this step

for English language
I executed
cd /js/javascript-tutorial-server
./edit en

but it shows " sh: 1: ./node_modules/.bin/gulp: not found "

OS : ubuntu 18.04
NodeJS : v8.10.0

Can't start server

I followed instruction in README.
When I'm trying to start server with code:

js/server$ ./edit en

I got this error :

js/server$ ./edit en [08:39:39] Using gulpfile /js/server/gulpfile.js [08:39:39] Starting 'edit'... [08:39:39] Starting 'webpack'... [08:39:39] Starting 'engine:koa:tutorial:importWatch'... [08:39:39] Starting 'livereload'... [08:39:39] Starting 'server'... (node:28882) DeprecationWarning: Tapable.plugin is deprecated. Use new API on.hooksinstead 05:09:42.609Z INFO application: Boot complete [08:39:42] 'engine:koa:tutorial:importWatch' errored after 3.55 s [08:39:42] Error: ENOENT: no such file or directory, lstat '/js/en.javascript.info' at Object.realpathSync (fs.js:1454:7) at new TutorialImporter (/js/server/modules/engine/koa/tutorial/lib/tutorialImporter.js:26:20) at module.exports (/js/server/modules/engine/koa/tutorial/tasks/importWatch.js:20:18) [08:39:42] 'edit' errored after 3.56 s [08:39:42] The following tasks did not complete: webpack, livereload, server [08:39:42] Did you forget to signal async completion?

as well as for ./edit ru ru:

[09:13:10] 'engine:koa:tutorial:importWatch' errored after 17 s [09:13:10] Error: Already exists an entry with slug:prototype-inheritance at TutorialTree.add (/js/server/modules/engine/koa/tutorial/models/tutorialTree.js:137:13) at TutorialImporter.syncArticle (/js/server/modules/engine/koa/tutorial/lib/tutorialImporter.js:229:15) at process._tickCallback (internal/process/next_tick.js:68:7) [09:13:10] 'edit' errored after 17 s [09:13:10] The following tasks did not complete: livereload [09:13:10] Did you forget to signal async completion?

module missing

[13:50:12] 'engine:koa:tutorial:importWatch' errored after 951 ms [13:50:12] Error: Cannot find module 'mongoose' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object.<anonymous> (/home/aequalis/Documents/my_passion/JS_ta-tranz/js/server/modules/engine/plunk/models/plunk.js:1:16) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object.<anonymous> (/home/aequalis/Documents/my_passion/JS_ta-tranz/js/server/modules/engine/plunk/index.js:2:17) [13:50:12] 'edit' errored after 955 ms [13:50:12] The following tasks did not complete: webpack, livereload, server [13:50:12] Did you forget to signal async completion?

Unable to run the server and encountered an error with "cannot find 'mongoose' module". Since I installed npm V10+ and updated npm modules.

Note: uglifyjs-webpack-plugin was deprecated. So I installed terser-webpack-plugin

Error: Cannot find module 'run-sequence'

module.js:471
throw err;
^

Error: Cannot find module 'run-sequence'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/Users/mkal/Documents/projects/jsinfo/js/javascript-tutorial-server/gulpfile.js:11:21)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)

Gulp error occurs when trying to start server

Hello @iliakan, when I run the command ./edit en I get the following output on the console:

[07:26:10] Using gulpfile ~/Documents/Github/js/javascript-tutorial-server/gulpfile.js
[07:26:10] Starting 'webpack'...
[07:26:12] Starting 'jsengine:koa:tutorial:importWatch'...
[07:26:12] 'jsengine:koa:tutorial:importWatch' errored after 203 ms
[07:26:12] Error: Cannot find module 'getChromeLocation'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
    at Function.Module._load (internal/modules/cjs/loader.js:506:25)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/urohit011/Documents/Github/js/javascript-tutorial-server/modules/jsengine/koa/tutorial/lib/getPlunkerToken.js:6:27)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/urohit011/Documents/Github/js/javascript-tutorial-server/modules/jsengine/koa/tutorial/lib/tutorialImporter.js:16:25)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/urohit011/Documents/Github/js/javascript-tutorial-server/modules/jsengine/koa/tutorial/tasks/importWatch.js:3:24)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
Gulp error details [ 'Cannot find module \'getChromeLocation\'',
  'Error: Cannot find module \'getChromeLocation\'\n    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)\n    at Function.Module._load (internal/modules/cjs/loader.js:506:25)\n    at Module.require (internal/modules/cjs/loader.js:636:17)\n    at require (internal/modules/cjs/helpers.js:20:18)\n    at Object.<anonymous> (/home/urohit011/Documents/Github/js/javascript-tutorial-server/modules/jsengine/koa/tutorial/lib/getPlunkerToken.js:6:27)\n    at Module._compile (internal/modules/cjs/loader.js:688:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)\n    at Module.load (internal/modules/cjs/loader.js:598:32)\n    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)\n    at Function.Module._load (internal/modules/cjs/loader.js:529:3)\n    at Module.require (internal/modules/cjs/loader.js:636:17)\n    at require (internal/modules/cjs/helpers.js:20:18)\n    at Object.<anonymous> (/home/urohit011/Documents/Github/js/javascript-tutorial-server/modules/jsengine/koa/tutorial/lib/tutorialImporter.js:16:25)\n    at Module._compile(internal/modules/cjs/loader.js:688:30)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)\n    at Module.load (internal/modules/cjs/loader.js:598:32)\n    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)\n    at Function.Module._load (internal/modules/cjs/loader.js:529:3)\nat Module.require (internal/modules/cjs/loader.js:636:17)\n    at require (internal/modules/cjs/helpers.js:20:18)\n    at Object.<anonymous> (/home/urohit011/Documents/Github/js/javascript-tutorial-server/modules/jsengine/koa/tutorial/tasks/importWatch.js:3:24)\n    at Module._compile (internal/modules/cjs/loader.js:688:30)' ]
(node:19008) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
[webpack] Time: 5508ms
Built at: 10/22/2018 7:26:17 AM
                                          Asset       Size  Chunks             Chunk Names
../img/favicon/apple-touch-icon-precomposed.png   5.86 KiB          [emitted]
                     ../img/favicon/favicon.ico    5.3 KiB          [emitted]
                     ../img/favicon/favicon.png   1.29 KiB          [emitted]
                    ../img/favicon/tileicon.png   4.82 KiB          [emitted]
                             ../libs/animate.js  469 bytes          [emitted]
                        ../libs/class-extend.js   3.95 KiB          [emitted]
             ../libs/compareDocumentPosition.js  970 bytes          [emitted]
                                  ../libs/d3.js    143 KiB          [emitted]
                      ../libs/documentScroll.js   1.15 KiB          [emitted]
                            ../libs/domtree.css  313 bytes          [emitted]
                             ../libs/domtree.js   5.59 KiB          [emitted]
                         ../libs/event-mixin.js   1.25 KiB          [emitted]
                           ../libs/getCoords.js  819 bytes          [emitted]
                              ../libs/lodash.js    458 KiB          [emitted]
                                      footer.js   4.59 KiB       0  [emitted]  footer
                                  frontpage.css   2.49 KiB       1  [emitted]  frontpage
                                   frontpage.js   1.13 KiB       1  [emitted]  frontpage
                                        head.js   19.1 KiB       2  [emitted]  head
           modules/styles/blocks/font/icons.otf   22.6 KiB          [emitted]
          modules/styles/blocks/font/icons.woff   14.6 KiB          [emitted]
    modules/styles/blocks/page-footer/slack.svg   1.49 KiB          [emitted]
                                     styles.css   82.4 KiB       3  [emitted]  styles
                                      styles.js   1.13 KiB       3  [emitted]  styles
                                    tutorial.js   36.4 KiB       4  [emitted]  tutorial
Entrypoint head = head.js
Entrypoint footer = footer.js
Entrypoint tutorial = tutorial.js
Entrypoint styles = styles.css styles.js
Entrypoint frontpage = frontpage.css frontpage.js
Child mini-css-extract-plugin node_modules/css-loader/index.js??ref--7-1!node_modules/postcss-loader/src/index.js??ref--7-2!modules/jsengine/webpack/hover-loader.js!node_modules/stylus-loader/index.js??ref--7-4!tmp/en/frontpage.styl:
    Entrypoint mini-css-extract-plugin = *
Child mini-css-extract-plugin node_modules/css-loader/index.js??ref--7-1!node_modules/postcss-loader/src/index.js??ref--7-2!modules/jsengine/webpack/hover-loader.js!node_modules/stylus-loader/index.js??ref--7-4!tmp/en/styles.styl:
    Entrypoint mini-css-extract-plugin = *
[07:26:17] Finished 'webpack' after 7.44 s

I have node v10.12.0, npm v6.4.1 and gulp 3.9.1. Please help me figure it out.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.