SolidOS / SolidOS/solid-panes

versionInfo.ts fix *Discussion*

Open
#528 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
106
Forks
52
Avg merge
13h 35m
Merged PRs (30d)
10

Description

Upon installing the most recent version of Solid Panes repo. It still bugs me for a versionInfo.ts file.

However, this is a simple fix and I paste it here for discussion incase there is an operating system distinction.

I believe the repo still runs and renders the Pane, but this allows it to start without any errors.

On a Windows 11 PC, it will throw a flag like this unless

WARNING in ./src/index.ts 35:0-40:3
export 'default' (reexported as 'versionInfo') was not found in './versionInfo/versionInfo' (possible exports: versionInfo)
@ ./dev/loader.ts 4:0-37 20:8-19

ERROR in C:\Users\Me\solid-panes\src\index.ts
./src/index.ts 13:7-18
[tsl] ERROR in C:\Users\Me\solid-panes\src\index.ts(13,8)
TS2613: Module '"C:\Users\Me\solid-panes\src\versionInfo\versionInfo"' has no default export. Did you mean to use 'import { versionInfo } from "C:\Users\Me\solid-panes\src\versionInfo\versionInfo"' instead?
ts-loader-default_e013e6f35f78e9da
@ ./dev/loader.ts 4:0-37 20:8-19

The Fix

import { versionInfo } from './versionInfo/versionInfo'; *as an import statement in index.ts

and in a versionInfo.ts file itself, just this code.

export const versionInfo = {
version: 'dev',
commit: 'local',
buildTime: new Date().toISOString()
};

This code in conjunction with the folder structure seems to fix the problem.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/index.ts and src/versionInfo/versionInfo.ts, then reproduce the reported installation or build output on Windows. Check that the versionInfo import and export agree and that the TS2613 error and re-export warning no longer appear.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.