-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.2 beta] - Error: Unknown dialect undefined on strapi app when start develop #13237
Comments
Did you create the TypeScript project from zero? |
Yes, was create from zero with TS, using version |
Hey, I'm having a similar problem. It's only happening on Docker, everything works fine on my local |
Does anyone have a quick fixes for this please ? We will go to production this weekend. Please help. Thank you very much. |
@gu-stav Please help me. 😢 |
I'm going to lock this, please do not ping random people. v4.2 is a beta release and should only be for testing. |
Thank you for taking the time for opening this issue. We would need more information on this. |
I'm getting this after upgrading from 4.2.0-beta3 to 4.2.0. Tried clearing .tmp/node_modules/.cache and rebuilding everything. Everything has been working great on the beta for the last few weeks. Any ideas? |
You will need to go to v4.3.0.beta as we didn't release typescript in v4.2.0 (it got delayed) |
Ah, I see! Thanks for the info 👍 @derrickmehaffy Follow up question on that - when is the 4.3.0 stable release expected? |
late July, I don't believe we have an exact date yet but it should be ~6 weeks after the release of v4.2.0 |
This issue can't be reproduced in 4.3.0-beta.2 (the last beta supporting TypeScript). Waiting for confirmation and/or for some days before closing the issue. |
I just ran into this issue with 4.3.0-beta.2, but specifically for unit testing in CI environments. I was able to solve locally following the suggestions in this issue by adding
With this tests run successfully. However, in higher environments I am again getting the following error: |
Hey @sepiette, by any chance, do you have a minimal example I could use to reproduce the issue you're having? I fail to break it on my side 😕 |
I'm having this issue as wel. Happening on |
With windows / development, when I run
I receive a config folder. When i run the same (even without
Both with node v16.16.0 Copying dist/config to server and it worked. Looks like this problem only occurs on unix systems? Here you have a generic compiled config folder that you can include for testing: |
This problem goes much deeper. None of the compiled |
@Convly I found the error. This is only the case, if the project contains a dot |
Having the same issue. When running on local machine no problem. The problem only happens when using Docker and strap in development environment. NO TypeScript! Using Strapi 4.3.2 Also tried using a PostgresDB. Same behaviour. |
@exotexot what is the name of project directory? |
@TimFoerster I've seen your comment about project name. My project only contains a-z values, no special charachters |
Thank you! |
This issue has been mentioned on Strapi Community Forum. There might be relevant details there: https://forum.strapi.io/t/strapi-v4-3-9-will-run-as-typescript/22356/5 |
@st33v3 legend 👍 First time using Strapi tonight in a fair while and bit shocked that the TypeScript setup didn't work out the box... |
Typescript strapi is not working as of September 28, 2022. Javascript strapi is working. I used postgres as my database. Same error as the above. |
The fix is going on but no update. |
it's in this state for months |
Is this problem ever gonna get any attention? |
Have found a few other duplicate issues and referenced them to this. Apologies, know I'm being a pain but I find it funny that some other issues (#14305, #14306) have been closed and marked as duplicates of this issue, but this issue, despite being marked "high priority" has not been progressed nor has the PR to fix it 😆 Hopefully making some noise will get those gears spinning again 👍 |
@st33v3 and @kulak91 seem to be correct. My "temporary" solution is to use patch-package with the following patch file patches.zip |
I can't get it to work on Centos 8, I have same issue saying Unknown dialect undefined, but it works on my laptop Macos |
@andreiwow2 have you already fixed your problem? Because i have the same issue with cent os 7 |
@chrizvo do you have a |
I ran a similar issue on Strapi 4.4.7 Typescript with a custom server.js file to inject Azure Key Vault Keys |
Similar issue on Strapi 4.5.4, using TypeScript. Here's the # --- BUILDER STAGE --- #
FROM alpine:latest AS builder
RUN apk --no-cache --update add nodejs npm bash curl
RUN curl -sf https://gobinaries.com/tj/node-prune | sh
WORKDIR /usr/src/app
COPY package.json .
RUN npm install
COPY . .
RUN npm run build:production
RUN rm -rf node_modules && npm install --omit=dev && node-prune
# --- RUNNER STAGE --- #
FROM alpine:latest AS runner
RUN apk --no-cache --update add nodejs npm
WORKDIR /usr/src/app
COPY --from=builder /usr/src/app/.env .env
COPY --from=builder /usr/src/app/dist ./dist
COPY --from=builder /usr/src/app/node_modules ./node_modules
COPY --from=builder /usr/src/app/config ./config
COPY --from=builder /usr/src/app/database ./database
COPY --from=builder /usr/src/app/public ./public
COPY --from=builder /usr/src/app/package.json ./package.json
# Run it!
EXPOSE 1337
CMD [ "npm", "run", "start:production" ] here is the version: '3'
services:
strapi:
build: .
ports:
- "1337:1337"
environment:
DATABASE_CLIENT: postgres
DATABASE_HOST: db
DATABASE_PORT: 5432
DATABASE_NAME: strapi
DATABASE_USERNAME: strapi
DATABASE_PASSWORD: strapi
depends_on:
- db
db:
image: postgres
environment:
POSTGRES_USER: strapi
POSTGRES_PASSWORD: strapi
POSTGRES_DB: strapi
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata: And this is the export default ({ env }) => ({
connections: {
default: {
connector: "bookshelf",
settings: {
client: "postgres",
host: env("DATABASE_HOST"),
port: env.int("DATABASE_PORT"),
database: env("DATABASE_NAME"),
username: env("DATABASE_USERNAME"),
password: env("DATABASE_PASSWORD"),
ssl: env.bool("DATABASE_SSL", false),
},
options: {
pool: {
min: 0,
max: 15,
idleTimeoutMillis: 30000,
createTimeoutMillis: 30000,
acquireTimeoutMillis: 30000,
},
},
},
},
}); |
@sunderee in your Dockerfile try copying over your tsconfig.json |
Just tried, same result. I'm migrating a project to JavaScript; and that seems to be working just fine. The only difference is that the output folder is |
build is the output folder of the admin, dist is the output folder of the entire project (TS -> JS) |
I had the same issue recently. The word
After that the issue should be resolved. At least it was resolved for me. |
Building your admin UI with development configuration... How to resolve it? |
I solved a similar issue when running If you are starting a Typescript project, you should follow the This is because the Hope this helps you guys. |
Hey man! Just added this It works now |
I have the same problems with strapi running on linux server in production mode. use volumes and dont bind folder. check your config, src, etc folders on the server. Everything is empty in my case. ... hope that helps somebody |
I solved this issue by starting Strapi from a node script instead: // server.js
const strapi = require("@strapi/strapi");
strapi({ distDir: "./dist" }).start(); |
Bug report
Required System information
v16.14.0
8.5.4
4.2.0-beta.2
postgres
Mac OS (M1)
Describe the bug
When using the
4.2.0-beta.2
with typescript I get an error.Steps to reproduce the behavior
strapi develop
Expected behavior
Strapi start develop correctly.
Code snippets
Additional context
When I use the version
4.2.0-beta.0
this issue does not happen and the project work as expected. But in versions4.2.0-beta.1
and4.2.0-beta.2
I have the same issue.The text was updated successfully, but these errors were encountered: