command-pal icon indicating copy to clipboard operation
command-pal copied to clipboard

How to create dev environment

Open rouilj opened this issue 2 years ago • 1 comments

Hi Ben:

So far I have cloned the repo. Then added:

% sudo apt-get install npm

then after npm run dev reported it can't find rollup I did:

% sudo apt-get install rollup

Now I get:

%  npm run dev

> [email protected] dev
> rollup -c -w

[!] Error: Cannot find module 'rollup-plugin-svelte'
Require stack:
- /home/rouilj/develop/command-pal/rollup.config.js
- /usr/share/nodejs/rollup/dist/shared/loadConfigFile.js
- /usr/share/nodejs/rollup/dist/bin/rollup
Error: Cannot find module 'rollup-plugin-svelte'
Require stack:
- /home/rouilj/develop/command-pal/rollup.config.js
- /usr/share/nodejs/rollup/dist/shared/loadConfigFile.js
- /usr/share/nodejs/rollup/dist/bin/rollup
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/rouilj/develop/command-pal/rollup.config.js:5:14)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.require.extensions.<computed> [as .js] (/usr/share/nodejs/rollup/dist/shared/loadConfigFile.js:619:20)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)

and the command hangs. ^c gets me back to the prompt.

apt search svelte doesn't return any hits.

% npm install rollup-plugin-svelte

works, but generates a bunch (20+) of deprecation warnings including for [email protected] (upgrade to core > 3.23.3), highlight.js etc.

54 vulnerabilities (1 low, 20 moderate, 28 high, 5 critical)

is the result.

However npm run dev does start a server. Navigating to it and opening public/cp-advanced/ gives me a working page that I can invoke command-pal. However inspecting the button icon shows me an SVG without the viewBox. Checking the source in src/MobileButton.svelte shows the viewBox.

Where do I go from here?

Am I missing a build/update step or something?

Details:

OS Ubuntu 22.04 nodejs 12.22.9

npm list
[email protected] /home/rouilj/develop/command-pal
├── @rollup/[email protected]
├── @rollup/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

rouilj avatar Jan 30 '23 23:01 rouilj

Ah got it. I need to explicitly request cp-advanced/local-dev. Pays to read the documentation 8-).

I see that it is still pulling style sheets and highlight.js from the CDN. Is that expected?

rouilj avatar Jan 31 '23 01:01 rouilj