MWS Installation Errors

By the way to get to this point I had to run this in a Terminal window to get the permissions to run the original script(s)

@stobot maybe this would help?

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

before running NPM

Thanks for the note @TW_Tones . I get the below message, anything obvious I did wrong here?

You seem to have added a space after the first word set - , remove it and try again/

Actually I added the space because when I tried it originally it showed the below, so I though that was a typo.
{B9263BDF-2D87-4400-B6ED-A4F7AB2EF35C}

Sorry, I did it inside a “Windows powershell” console.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\antho>

^ Powershel prompt

Ah, thanks. Ran it in Powershell as described.

Trying the install again though doesn’t seem to be any different, same error messages on my end.

I am a newby with this as well and still have my own problems above :face_with_raised_eyebrow:

@Arlen22

I can confirm the exact same error with my Windows 11 - powershell scripts, if I try to start the server.

Initially I did use node.js 22.12 then changed to 22.14 → no difference

I used the How to run documentation to install the app.


There seems to be a localhost_certs.sh file, which is not compatible with Windows. So if localhost.cnf is needed, it can not work.

1 Like

Right.

I see this as a “Teething Problem”.

TW — POWERSHELL together would be The Bee’s Knees.

@pmario @stobot @TiddlyTitch @TW_Tones

The URL_INVALID error was a prisma regression, so I locked the version at one that works. Please try again.

@Arlen22 … I did re-install everything. But no changes. Still the same error.

Did also checkout the dev environment. → Same problem

It’s working for me. My exact steps are:

npm init @tiddlywiki/mws@latest mws-run-2
cd mws-run-2
npm start

Hi @Arlen22, I tried this today and although the terminal notes were slightly different (there was an okay to proceed check for example), the result looks pretty similar. I’ve attached the logs in case they’re useful. 2025-04-22T12_07_30_769Z-debug-0.log.tid (58.8 KB)
2025-04-22T12_07_20_749Z-debug-0.log.tid (5.9 KB)
Used .tid due to upload restrictions.

@Arlen22 – Which OS do you use? I did use the commands you pasted with

  • I deleted the old directory
  • PowerShell 7.5.0
  • Win 11 Pro
  • Node.js 22.14.0
Still no luck -- Error text
PS C:\Users\Mario> npm init @tiddlywiki/mws@latest mws-run-2

> npx
> create-mws mws-run-2

C:\Users\Mario\mws-run-2
├─ package.json
├─ mws.run.mjs
├─ localhost_certs.sh
└─ Running npm install...
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead

added 48 packages, and audited 49 packages in 20s

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

found 0 vulnerabilities
PS C:\Users\Mario> cd mws-run-2
PS C:\Users\Mario\mws-run-2> npm start

> mws-wiki-instance@1.0.0 start
> node --enable-source-maps mws.run.mjs

Password master key created at ./localpass.key
LibsqlError: URL_INVALID: The authority part of the URL is not in a valid format
    at parseAuthority (file:///C:/Users/Mario/mws-run-2/node_modules/@libsql/core/lib-esm/uri.js:34:15)
    at parseUri (file:///C:/Users/Mario/mws-run-2/node_modules/@libsql/core/lib-esm/uri.js:14:11)
    at expandConfig (file:///C:/Users/Mario/mws-run-2/node_modules/@libsql/core/lib-esm/config.js:25:17)
    at createClient (file:///C:/Users/Mario/mws-run-2/node_modules/@libsql/client/lib-esm/node.js:11:26)
    at new StartupCommander (file:///C:/Users/Mario/mws-run-2/node_modules/@tiddlywiki/mws/src/commander.ts:97:19)
    at new Commander (file:///C:/Users/Mario/mws-run-2/node_modules/@tiddlywiki/mws/src/commander.ts:269:5)
    at startServer (file:///C:/Users/Mario/mws-run-2/node_modules/@tiddlywiki/mws/src/server.ts:129:21) {
  code: 'URL_INVALID',
  rawCode: undefined,
  [cause]: undefined
}
GitHub dev version
PowerShell 7.5.0
PS E:\git\tiddly\tiddlywiki\MultiWikiServer> npm start

> @tiddlywiki/mws@0.0.11 start
> npm run build && node mws.dev.mjs


> @tiddlywiki/mws@0.0.11 build
> npm run tsc && tsup


> @tiddlywiki/mws@0.0.11 tsc
> tsc -p tsconfig.json --skipLibCheck

CLI Building entry: src/server.ts
CLI Using tsconfig: tsconfig.json
CLI tsup v8.4.0
CLI Using tsup config: E:\git\tiddly\tiddlywiki\MultiWikiServer\tsup.config.ts
CLI Target: es2020
CLI Cleaning output folder
ESM Build start
CJS Build start

[16:27:44]  WARN  ▲ [WARNING] "import.meta" is not available with the "cjs" output format and will be empty [empty-import-meta]

    src/utils/utils.ts:392:65:
      392 │ ...= "undefined" ? fileURLToPath(import.meta.url) : module.filename;
          ╵                                  ~~~~~~~~~~~

  You need to set the output format to "esm" for "import.meta" to work correctly.




[16:27:44]  WARN  ▲ [WARNING] "import.meta" is not available with the "cjs" output format and will be empty [empty-import-meta]

    src/utils/utils.ts:396:65:
      396 │ ...= "undefined" ? fileURLToPath(import.meta.url) : module.filename;
          ╵                                  ~~~~~~~~~~~

  You need to set the output format to "esm" for "import.meta" to work correctly.



ESM dist\server.js     506.49 KB
ESM dist\server.js.map 898.81 KB
ESM ⚡️ Build success in 223ms
CJS dist\server.cjs     508.95 KB
CJS dist\server.cjs.map 899.07 KB
CJS ⚡️ Build success in 224ms
LibsqlError: URL_INVALID: The authority part of the URL is not in a valid format
    at parseAuthority (file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/node_modules/@libsql/core/lib-esm/uri.js:34:15)
    at parseUri (file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/node_modules/@libsql/core/lib-esm/uri.js:14:11)
    at expandConfig (file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/node_modules/@libsql/core/lib-esm/config.js:25:17)
    at createClient (file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/node_modules/@libsql/client/lib-esm/node.js:11:26)
    at new StartupCommander (file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/src/commander.ts:97:19)
    at new Commander (file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/src/commander.ts:269:5)
    at startServer (file:///E:/git/tiddly/tiddlywiki/MultiWikiServer/src/server.ts:129:21) {
  code: 'URL_INVALID',
  rawCode: undefined,
  [cause]: undefined
}
PS E:\git\tiddly\tiddlywiki\MultiWikiServer>
1 Like

@pmario I believe I’ve fixed the windows bugs. Please try again and let me know.

2 Likes

@Arlen22 – It seems to work now. :+1:

Works for me too!!! Thanks for that!

Dang. Based on your question about version number from the other MWS thread, I thought maybe there was an update so I followed the instructions above and just did mws-run-3. That failed like it used to before you fixed it. Then I thought maybe mws-run-2 was special so I deleted that folder and tried again. That also failed, so now I’m back to no install at all.

Um, wow, it’s working fine for me. Can you include logs?

Yes, here are the two log files that seem to be generated.

Animation

2025-05-08T13_30_05_866Z-debug-0.log.json (3.3 KB)
2025-05-08T13_30_08_780Z-debug-0.log.json (73.2 KB)