Category : typescript

Very new to Docker but When trying to run the container after building I get the following error, has anyone ran into this before? ‘internal/modules/cjs/loader.js:905 throw err;’ ^ ‘Error: Cannot find module ‘/home/backend/dist/src/server.js’ at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15) at Function.Module._load (internal/modules/cjs/loader.js:746:27) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) at internal/main/run_main_module.js:17:47 { code: ‘MODULE_NOT_FOUND’, requireStack: []’ I have built without ..

Read more

I tried to create a todo-app with Node.js, TypeScript, MySQL. This app works well. There is no issue. However, when I tried to have this app on Docker Container, I have the following error. Failed to load resource: net::ERR_NAME_NOT_RESOLVED TypeError: Failed to fetch at getTodos (ListTodo.tsx:16) at ListTodo.tsx:25 at invokePassiveEffectCreate (react-dom.development.js:23487) at HTMLUnknownElement.callCallback (react-dom.development.js:3945) at ..

Read more

I’m currently building a system in Node with a Postgres db, and I’ve created a container using docker-compose for both. By running docker-compose up I manage to initialize all container (Node app, Postgres db and PGAdmin) and a connection is successfully established. server | yarn run v1.22.5 server | $ ts-node-dev –respawn –ignore-watch node_modules src/index.ts ..

Read more

I’m currently building a system in Node with a Postgres db, and I’ve created a container using docker-compose for both. By running docker-compose up I manage to initialize all container (Node app, Postgres db and PGAdmin) and a connection is successfully established. server | yarn run v1.22.5 server | $ ts-node-dev –respawn –ignore-watch node_modules src/index.ts ..

Read more

Connecting to a MongoDB (with ReplicaSet) running in Docker worked in 5.13.9 but fails in 6.0.8 docker-compose.yml for the database: This is the docker-compose.yml file for the Database: version: ‘3.9’ services: loggerdb: image: mongo container_name: loggerdb command: ["–replSet", "rs0", "–bind_ip_all", ] restart: always ports: – "27017:27017" volumes: – ./data:/data/db environment: MONGO_INITDB_DATABASE: logger networks: default: external: ..

Read more

When I run docker build on my codebase, it doesn’t apply the file modifications. I’m using TypeScript with Node as the language/framework. Here is my Dockerfile: #Imports the node runtime/os base image FROM node:14 #like cd into the working directory WORKDIR /usr/src/app ENV PORT 8080 #copies the package.json from the local dev machine and pastes ..

Read more

I am creating one react js application with typescript. Now I am trying to build application using docker and its giving error as below #40 98.73 src/components/admissions/admissionName.tsx #40 98.73 Line 6:22: ‘JSX’ is not defined no-undef #40 98.73 #40 98.73 src/components/buttons/buttons.tsx #40 98.73 Line 6:13: ‘KeyOrJSX’ is not defined no-undef #40 98.73 #40 98.73 src/components/buttons/iconButton.tsx ..

Read more

I keep getting the error: Refused to apply style from ‘https://mysitenet/static/css/main.a617e044.chunk.css’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled. Failed to load resource: the server responded with a status of 503 () I have gone through several SO posts which suggest to include js, css ..

Read more