rixo / svench

A lightweight workbench to develop your Svelte components in isolation

Home Page:svench-docs.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New installation issues

happybeing opened this issue · comments

Hi @rixo (happybeing here from Svelte Discord) trying out Svench for the first time and have some issues, maybe with tool versions (I'm on node 10.19, Ubuntu 19) or perhaps missing dependencies. Are they obvious to you?

Following the README, first line doesn't work, so I used the following:

git clone https://github.com/rixo/svench.git
cd svench/example
yarn
yarn svench
$ yarn
yarn install v1.22.4
warning package.json: No license field
warning svelte-app@1.0.0: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.12: The platform "linux" is incompatible with this module.
info "fsevents@1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.1.2: The platform "linux" is incompatible with this module.
info "fsevents@2.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@rixo/eslint-config-svelte > eslint-import-resolver-webpack@0.11.1" has unmet peer dependency "eslint-plugin-import@>=1.4.0".
warning "@rixo/eslint-config-svelte > eslint-import-resolver-webpack@0.11.1" has unmet peer dependency "webpack@>=1.11.0".
warning "@rixo/eslint-config-svelte > eslint-plugin-svelte3@2.7.3" has unmet peer dependency "eslint@>=6.0.0".
warning "@rixo/eslint-config-svelte > prettier-plugin-svelte@0.7.0" has unmet peer dependency "prettier@^1.16.4".
warning " > @rollup/plugin-commonjs@11.0.2" has incorrect peer dependency "rollup@^1.20.0".
warning " > rollup-plugin-hot@0.0.20" has incorrect peer dependency "rollup@^1.24.0".
warning "rollup-plugin-svelte-hot > rollup-plugin-hot@0.0.9" has incorrect peer dependency "rollup@^1.24.0".
[4/4] Building fresh packages...
Done in 20.21s.

$ yarn svench
yarn run v1.22.4
warning package.json: No license field
$ SVENCH=1 rollup -w --config rollup.config.svelte-template-split.js
[routix] Watching /home/mrh/src/svelte/components/svench/example/src/**/*.(svench|svench.svelte|svench.svx)
[Svelte HMR] Setting css option to false (set hot.noDisableCss to true to bypass)
rollup v2.7.2
bundles src/main.js → public/build/bundle.js...
[HMR] Listening on port 38670
[HMR] Serving from RAM at http://127.0.0.1:38670
[!] (plugin svench) TypeError: Could not load /home/mrh/src/svelte/components/svench/example/node_modules/svench/tmp/routes.js (imported by /home/mrh/src/svelte/components/svench/example/node_modules/svench/routes.js): Object.fromEntries is not a function
TypeError: Could not load /home/mrh/src/svelte/components/svench/example/node_modules/svench/tmp/routes.js (imported by /home/mrh/src/svelte/components/svench/example/node_modules/svench/routes.js): Object.fromEntries is not a function
    at parseValue (/home/mrh/src/svelte/components/svench/example/node_modules/svench/rollup.js:28185:21)
    at parseValue (/home/mrh/src/svelte/components/svench/example/node_modules/svench/rollup.js:28182:14)
    at node.attributes.forEach.attr (/home/mrh/src/svelte/components/svench/example/node_modules/svench/rollup.js:28214:32)
    at Array.forEach (<anonymous>)
    at Object.enter (/home/mrh/src/svelte/components/svench/example/node_modules/svench/rollup.js:28213:25)
    at visit (/home/mrh/src/svelte/components/svench/example/node_modules/svench/rollup.js:6470:11)
    at visit (/home/mrh/src/svelte/components/svench/example/node_modules/svench/rollup.js:6502:13)
    at walk (/home/mrh/src/svelte/components/svench/example/node_modules/svench/rollup.js:6421:10)
    at parseSvenchOptions (/home/mrh/src/svelte/components/svench/example/node_modules/svench/rollup.js:28203:3)
    at parse_1 (/home/mrh/src/svelte/components/svench/example/node_modules/svench/rollup.js:28313:35)
commented

Thanks for trying. Yup, node version. Object.fromEntries is Node 12, I hadn't realized. I may add a polyfill but there might be more... Do you think Node 12 is an acceptable requirement?

Dunno, guess it depends on what you need, how badly you need it and what most people are likely to be using (which I'm not sure about).

I use nvm so not an issue for me and that fixed the error.

No idea what I'm doing but lots of buttons to press so should keep me happy 😄

Thanks for Svench!

Reopening to log things that might be useful as I stumble around...

  • maybe in the readme to suggest browsing the items in the Svench menu and give a couple of suggestions such as: navigate to concepts > menu which has useful info about using Svench including how to customise the menu structure and add documentation. It prompted me to look at examples > CustomizeMenu which was really helpful in deciphering what's going on in the menu. You may know better starting points, but this was good for me.
  • I think it would be good to echo any getting started advice on the index page. Also general guidance which I'm now inferring like "Everything in the menu is a customisable component, although the menus with submenus are a special case of component, so not one of your components. Some components in the examples are just simple demos without explanation, but several contain documentation either for the component, or to explain how to use Svench. By using the MDsveX preprocessor, the documentation in Svench examples uses markdown.
  • examples > CustomizeMenu doesn't seem to do what it says. I'm expecting to see "custom page title" somewhere (in the menu?) but I only see it in the page (RHS) not in the menu or anywhere else I'm looking. The menu shows CustomizeMenu, which is what I clicked on to get here.
  • clicking the triangles to open submenus works fine except for components. I can open the submenu by clicking on components though. (Using Chromium on Ubuntu). UPDATE: actually this is pretty random, any triangle icon can just stop responding to clicks, and can resume responding. Seems random so far.

Posting this for now. If useful, I will add more as I go.

commented

Ah ah yes, usage docs is still a little... to be done!

Actually the current example is more a test bed for development of Svench itself. I am planning to do a more orderly demo, with a proper learning path. Your feedback might help at this point.

actually this is pretty random, any triangle icon can just stop responding to clicks, and can resume responding. Seems random so far.

You can't close a parent of the page (view / component) you're currently on. Could this be your problem?

I'm not very satisfied with this menu and its current behaviour (even when working) to be honest. I'm planning to see if I can do better when I can. Any suggestion welcome.

You can't close a parent of the page (view / component) you're currently on. Could this be your problem?

That's it. I think it seemed broken because I'm not used to that behaviour.

I'll be happy to provide feedback when its useful and will be interested to see how Svench develops. Feel free to ping me. Good luck.