Comments (36)
PR is ready ;).
Wohh, wait until I tested the above
from tsed.
ok after running migration it works :)
from tsed.
Can you try that:
export const SWAGGER_UI_DIST = dirname(url.fileURLToPath(import.meta.resolve('swagger-ui-dist')))
normalize
function isn't necessary, because the SWAGGER_UI_DIST is path consumer by a Fs lib.
from tsed.
Hello @VictoriqueMoe
I just tried to reproduce and this swagger load correctly in a pure ESM project.
I'll checkout your project to see if there is something different.
See you
from tsed.
Hello @VictoriqueMoe I just tried to reproduce and this swagger load correctly in a pure ESM project.
I'll checkout your project to see if there is something different.
See you
weird, then you need this branch: https://github.com/waifuvault/WaifuVault/tree/bump-version
Thank you very much :(
from tsed.
I'm not able to start the project, the DB doesn't start XD
from tsed.
I'm not able to start the project, the DB doesn't start XD
use this env
PORT=localhost:8081
HTTPS=false
HTTPS_PORT=4000
SESSION_KEY=YourSessionKey
NODE_ENV=development
BASE_URL=http://localhost:8081
FILE_SIZE_UPLOAD_LIMIT_MB=512
should start. DB is just sqlite. should not have a problem
from tsed.
oh yeh, run npm run runmigration
then it should work :)
from tsed.
That's what I told myself and created the .env, but strangely I got this:
event: 'SERVER_BOOTSTRAP_ERROR',
message: 'no such table: user_model',
stack: 'SqliteError: no such table: user_model\n' +
from tsed.
yeh, you need to do npm run runmigration
to create the tables
from tsed.
Here is the swagger docs:
from tsed.
But isn't on your branch. I'll checkout your branch to see if there is dependencies issue
from tsed.
But isn't on your branch. I'll checkout your branch to see if there is dependencies issue
oh yea, on the main branch it is ok. but the branch i posted is the issue one :)
from tsed.
oh yea, on the main branch it is ok. but the branch i posted is the issue one :)
On the main branch, I updated the packages. ho hey I don't make this kind of mistake yet :p
On your branch I have the swagger ui also :D
from tsed.
I have to clear the browser cache. After that, I saw the new swagger ui version ^^. Maybe you have to clear your cache also.
from tsed.
I have to clear the browser cache. After that, I saw the new swagger ui version ^^. Maybe you have to clear your cache also.
Is this the new branch? clearing my cashe did nothing, and using different browsers
from tsed.
I see you have 127.0.0.1, can you try with localhost ?
from tsed.
Try also to curl this url: http://localhost:8081/api-docs/swagger-ui-standalone-preset.js
I have that in the console:
[2024-05-02T17:47:01.832] [INFO ] [TSED] - {
reqId: 'efdf6738859042d7a89f7e8569a46ad4',
method: 'GET',
url: '/api-docs/swagger-ui-standalone-preset.js',
duration: 8,
route: '/api-docs',
time: 2024-05-02T15:47:01.832Z,
event: 'request.end',
status: 200,
status_code: '200',
state: 'OK'
}
from tsed.
I see you have 127.0.0.1, can you try with localhost ?
yes, i set my env to BASE_URL=http://127.0.0.1:8081
because setting it to localhost doesn't work with the printed text on console.
from tsed.
Hum ok, but you have PORT=localhost:8081 ?
from tsed.
my env
PORT=localhost:8081
SESSION_KEY=foo
HTTPS=false
HTTPS_PORT=4000
NODE_ENV=development
BASE_URL=http://localhost:8081
FILE_SIZE_UPLOAD_LIMIT_MB=9000
#CLAM_PATH="Y:\dp\Dropbox\Portable apps\clamav-1.2.1.win.x64"
BLOCKED_MIME_TYPES=application/x-dosexec,application/x-executable,application/x-hdf5,application/x-java-archive,application/vnd.rar
USE_CLOUDFLARE=false
MAX_URL_LENGTH=4096
SALT=3jS'f;Β£[
UPLOAD_SECRET=foobar
MS_DEFENDER_PATH="C:\Program Files\Windows Defender"
from tsed.
Hum ok, but you have PORT=localhost:8081 ?
oh yeh, all the Webservices and home page load fine. just swagger
from tsed.
do you think this is a Windows issue?
maybe use path.sep
?
from tsed.
heu.....yes probably XD
from tsed.
can you edit the node_module/@tsed/swagger/dist/lib/constants.js and change the / pls ?
from tsed.
that said, Windows works with both /
and \
path.sep
should give the right /
based on OS, as should path.normalize
and path.resolve
but eh. weird
from tsed.
can you edit the node_module/@tsed/swagger/dist/lib/constants.js and change the / pls ?
sure. one sec
from tsed.
You have certainly right, this is probably the problem ;)
from tsed.
yeh.
dirname(import.meta.resolve("swagger-ui-dist"))
resolves to: file:///C:/Users/ray-q/IdeaProjects/WaifuVault/node_modules/swagger-ui-dist
so
dirname(import.meta.resolve("swagger-ui-dist")).replace("file://", "")
resolves to: /C:/Users/ray-q/IdeaProjects/WaifuVault/node_modules/swagger-ui-dist
notice the /
at the start :D
from tsed.
Hum ok T.T
Now we can try to fix that xD
from tsed.
export const SWAGGER_UI_DIST = normalize(dirname(import.meta.resolve("swagger-ui-dist"))).replace(`file:${sep}`, "");
seems to work... but not sure for linux
but i kinda hate it
from tsed.
Sure, I'll try it when I'm back at my pc
from tsed.
PR is ready ;).
from tsed.
Yes, this works too
from tsed.
π Are you happy?
If you appreciated the support, know that it is free and is carried out on personal time ;)
A support, even a little bit makes a difference for me and continues to bring you answers!
from tsed.
π This issue has been resolved in version 7.68.5 π
The release is available on:
v7.68.5
- GitHub release
Your semantic-release bot π¦π
from tsed.
Related Issues (20)
- [BUG] Dependencies issue when update Mikro orm to v4.5.0 + HOT 2
- [BUG] Update temporal.io dependencies causing issue HOT 2
- [BUG] Dependency injection w/ useAsyncFactory returns Promise on 2nd invoke() HOT 3
- Link Checker Report HOT 1
- [BUG] Missing repository's d.ts after running 'npm run prisma:generate'
- Override reconnectOnError in tsed ioredis module HOT 3
- Enhance Context Management for event listeners in `SocketHandlersBuilder` HOT 2
- [BUG] Lack support for ACK callbacks HOT 2
- Missing the basics HOT 4
- [BUG] Swagger UI no longer loads HOT 5
- Link Checker Report HOT 1
- [BUG] `deepClone` does not respect built-in objects like `Set` and `Map` HOT 2
- [BUG] Swagger issue on loading an undefined resource HOT 9
- [BUG] Custom `.Error` does not work on schemas other than `@Required` HOT 1
- [BUG] How do i add a description to a `@BodyParams` HOT 2
- [BUG] tsed doesn't work with Nx Workspace HOT 1
- [BUG] ESM error in BullMQModule HOT 3
- [BUG] Children Controller Routes should be declared before parent HOT 8
- [BUG] package installation of @tsed/typeorm and typeorm produces dependency conflict HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tsed.