Category : npm

I have a Vue application which I serve with docker, currently I want to use environment variables to target specific project repo. But when I am setting env variables, it’s not picking up in dockerfile, What am I doing wrong in my setup ? NPM scripts. scripts: { "build:project1": "vue-cli-service build src/project1/main.js", "deploy:project1": "cross-env PROJECT_REPO=project1 ..

Read more

Docker is great while developing the app locally because it matches the production environment. How I’ve seen it done: Mount the code Mounting the host code folder inside the container allows editing the code and to instantly see the result inside the running docker container. Normally node_modules are in .gitignore, meaning that npm install is ..

Read more

So I’m developing a web app using NestJS as its backend. Also I’m using docker to build all my backend. I’m having a problem that some installed packages logs as "undefined" and some other works properly. For example in my CreateUser class I have import bcrypt from ‘bcrypt’; @Injectable() export class CreateUser { constructor( @InjectRepository(User) ..

Read more

I am experimenting with node.js and docker. I manage to build the image but I can not run it. This is what I have: package.json: { "name": "rugbe", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "dev": "nodemon ./index.js" }, "author": "", "license": "ISC", "dependencies": { "express": "^4.17.1" }, "devDependencies": { "@types/node": "^16.11.6", "nodemon": "^2.0.14" ..

Read more

This is very bizarre as I have a mismatch in behaviour of highlight.js. This is how I install it: npm install highlight.js This is how I initialize it: import hljs from ‘highlight.js/lib/core’; // Particular languages import bash from ‘highlight.js/lib/languages/bash’; import css from ‘highlight.js/lib/languages/css’; import javascript from ‘highlight.js/lib/languages/javascript’; import php from ‘highlight.js/lib/languages/php’; import phpTemplate from ‘highlight.js/lib/languages/php-template’; ..

Read more