breck7 / scroll

Scroll is a language for scientists of all ages. Scroll includes a command line app that builds static blogs, websites, CSVs, text files, and more.
https://scroll.pub
Other
445 stars 18 forks source link

WWS list / fetch fails on fresh install #115

Closed nickisnoble closed 4 months ago

nickisnoble commented 4 months ago

Maybe I've missed something, but following the instructions in wws.scroll, this is what I get on wws list or wws fetch

Error reading '$path'
/opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/Disk.node.js:16
    throw err
    ^

Error: ENOENT: no such file or directory, open '/opt/homebrew/lib/node_modules/scroll-cli/header.scroll'
breck7 commented 4 months ago

Can you share a full screenshot? Here's what I get

Screenshot 2024-06-29 at 5 47 40 AM

nickisnoble commented 4 months ago

Output:

❯ npm i -g scroll-cli
added 8 packages in 246ms

1 package is looking for funding
  run `npm fund` for details

❯ wws init
👍 Initialized new WWS cache in '/Users/nn/Code/wws'.

❯ wws fetch
Error reading '$path'
/opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/Disk.node.js:16
    throw err
    ^

Error: ENOENT: no such file or directory, open '/opt/homebrew/lib/node_modules/scroll-cli/header.scroll'
    at Object.readFileSync (node:fs:448:20)
    at Disk.read (/opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/Disk.node.js:13:15)
    at DiskWriter._read (/opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/TreeFileSystem.js:20:91)
    at DiskWriter.read (/opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/TreeFileSystem.js:24:17)
    at ScrollFileSystem.read (/opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/TreeFileSystem.js:77:26)
    at ScrollFileSystem._assembleFile (/opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/TreeFileSystem.js:104:21)
    at /opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/TreeFileSystem.js:132:35
    at Array.forEach (<anonymous>)
    at ScrollFileSystem._assembleFile (/opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/TreeFileSystem.js:127:11)
    at ScrollFileSystem.assembleFile (/opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/TreeFileSystem.js:196:32) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/opt/homebrew/lib/node_modules/scroll-cli/header.scroll'
}

Node.js v22.3.0

❯ wws list
Error reading '$path'
/opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/Disk.node.js:16
    throw err
    ^

Error: ENOENT: no such file or directory, open '/opt/homebrew/lib/node_modules/scroll-cli/header.scroll'
    at Object.readFileSync (node:fs:448:20)
    at Disk.read (/opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/Disk.node.js:13:15)
    at DiskWriter._read (/opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/TreeFileSystem.js:20:91)
    at DiskWriter.read (/opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/TreeFileSystem.js:24:17)
    at ScrollFileSystem.read (/opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/TreeFileSystem.js:77:26)
    at ScrollFileSystem._assembleFile (/opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/TreeFileSystem.js:104:21)
    at /opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/TreeFileSystem.js:132:35
    at Array.forEach (<anonymous>)
    at ScrollFileSystem._assembleFile (/opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/TreeFileSystem.js:127:11)
    at ScrollFileSystem.assembleFile (/opt/homebrew/lib/node_modules/scroll-cli/node_modules/scrollsdk/products/TreeFileSystem.js:196:32) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/opt/homebrew/lib/node_modules/scroll-cli/header.scroll'
}

Node.js v22.3.0

If I $ ls -al /opt/homebrew/lib/node_modules/scroll-cli/ to check, everything is there but not header.scroll

❯ ls -al /opt/homebrew/lib/node_modules/scroll-cli/
total 192
drwxr-xr-x@ 11 nn  admin    352 Jun 29 11:46 .
drwxr-xr-x@ 14 nn  admin    448 Jun 29 11:46 ..
drwxr-xr-x@ 15 nn  admin    480 Jun 29 11:46 external
drwxr-xr-x@ 10 nn  admin    320 Jun 29 11:46 node_modules
-rw-r--r--@  1 nn  admin   1386 Jun 29 11:46 package.json
drwxr-xr-x@ 75 nn  admin   2400 Jun 29 11:46 parsers
-rw-r--r--@  1 nn  admin  34265 Jun 29 11:46 readme.html
-rw-r--r--@  1 nn  admin   2586 Jun 29 11:46 readme.scroll
-rwxr-xr-x@  1 nn  admin  38002 Jun 29 11:46 scroll.js
-rwxr-xr-x@  1 nn  admin   5447 Jun 29 11:46 wws.js
-rw-r--r--@  1 nn  admin   4006 Jun 29 11:46 wws.scroll

Edit: Creating header.scroll doesn't fix, then it's looking for the stripe button – seems like there's a lot not included from the repo than this wants?

And the wws folder created with wws init just has index.scroll containing The World Wide Scroll

nickisnoble commented 4 months ago

Also tried upgrading homebrew, node, npm, and reinstalling

breck7 commented 4 months ago

Fantastic bug report. Just pushed a fix (hopefully). Thanks @nickisnoble !

nickisnoble commented 4 months ago

Still having an issue after fresh install, this time:

  code: 'ENOENT',
  syscall: 'open',
  path: '/opt/homebrew/lib/node_modules/scroll-cli/stripeBuyButton.scroll'
breck7 commented 4 months ago

Sorry! Just added that file to the npm package.

I've got to add some automated tests for wws to run in CI to pick up things like this.

breck7 commented 4 months ago

Okay I'm going to move WWS to its own repo with its own tests

breck7 commented 4 months ago

It will be here: https://github.com/breck7/wws

breck7 commented 4 months ago

Okay @nickisnoble . Version 0.4.0 is live and with a better design. Install directly from GitHub now:

 git clone https://github.com/breck7/wws
 cd wws
 npm install .
 npm install -g .
 wws list
 wws fetch scroll
 wws open