borsini / chrome-otto-tabs

Smart tabs management
https://chrome.google.com/webstore/detail/otto-tabs/pjgajilkdijnbfmglfbpnenocpajmdlb
30 stars 5 forks source link

[Question/Support ❓] Provide a complete instructions on how to build #20

Closed Ashark closed 5 months ago

Ashark commented 1 year ago

Describe your question or ask for support

The "Want to build and install the extension yourself" section says:

Type yarn archive. This will execute the unit tests and create a build folder. This folder contains all the extension files.

When I run this, I got the

$ mocha -r ts-node/register test/**/*.spec.ts
/bin/sh: line 1: mocha: command not found

Now I have installed nodejs-mocha (from AUR), but still there is another error:

$ mocha -r ts-node/register test/**/*.spec.ts

✖ ERROR: Error: Cannot find module 'ts-node/register'
Require stack:
- /usr/lib/node_modules/mocha/lib/nodejs/esm-utils.js
- /usr/lib/node_modules/mocha/lib/mocha.js
- /usr/lib/node_modules/mocha/lib/cli/one-and-dones.js
- /usr/lib/node_modules/mocha/lib/cli/options.js
- /usr/lib/node_modules/mocha/bin/mocha.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at exports.requireOrImport (/usr/lib/node_modules/mocha/lib/nodejs/esm-utils.js:53:16)
    at async exports.handleRequires (/usr/lib/node_modules/mocha/lib/cli/run-helpers.js:94:28)
    at async /usr/lib/node_modules/mocha/lib/cli/run.js:349:25 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/lib/node_modules/mocha/lib/nodejs/esm-utils.js',
    '/usr/lib/node_modules/mocha/lib/mocha.js',
    '/usr/lib/node_modules/mocha/lib/cli/one-and-dones.js',
    '/usr/lib/node_modules/mocha/lib/cli/options.js',
    '/usr/lib/node_modules/mocha/bin/mocha.js'
  ]
}

Can you please provide a complete instruction to follow, to be able to build the extension?

Anything else?

No response

borsini commented 5 months ago

Hello there, you're missing the very first command to execute after cloning a project: yarn install or simply yarn. I updated the README, hope that it is clearer now. Thanks!