Categories
Mastering Development

React-native: Could not resolve module masked-view from @react-navigation\stack\src\views\MaskedViewNative.tsx

I am getting this below error while building react-native app. @react-native-community/masked-view and @react-navigation\stack are up to date but not sure why this package is not being resolved while building. error: Error: While trying to resolve module `@react-native-community/masked-view` from file `C:\..\..\node_ modules\@react-navigation\stack\src\views\MaskedViewNative.tsx`, the package `C:\..\..\node_modules\@react-n ative-community\masked-view\package.json` was successfully found. However, this package itself specifies a `main` […]

Categories
Mastering Development

how to show data label on barchart using chart.js in Angular10 project?

In Angular project I am implementing charts using chart.js latest version 2.9.3 I implemented doughnut chart, stacked bar chart perfectly,,Now I have to implement stacked bar chart which contain data labels on y-axis. So from chart.js documentation using chartjs-plugin-datalabels plugin I tried to display the labels here I got cli error decalare module chart.js To […]

Categories
Mastering Development

Missing modules used in the passport module in React Native

I’m currently working with Passport.js for sessions in my React Native app. After setting the server up and getting the code ready, I tried to run the app but was faced with a series of odd errors causing the build to fail. First error that shows right after npm run ios is: Error: Unable to […]

Categories
Mastering Development

TypeScript – error TS5023: Unknown compiler option ‘-r’

I’m working on Windows environment and trying to run a forked node.js + typescript project. This is my package.json : { "name": "my-task", "version": "1.0.0", "private": true, "main": "dist/main.js", "scripts": { "start": "tsc-watch –onSuccess ‘node -r source-map-support/register .’", "test": "jest", "lint": "eslint –cache ‘{src,test}/**/*.ts’" }, "dependencies": { "@types/express": "^4.17.7", "@types/node": "^12.12.53", "express": "^4.17.1", "get-port": "^5.1.1", […]

Categories
Mastering Development

dockerFile copy: Forbidden path outside the build context:

I have the following folder structure: – main/ .docker-compose.yml – backend/ – micro-hr/ .dockerfile – rabbitmq i have my micro-hr folder where is my main package and I have a local lib which is rabbitmq this is my dockerfile: FROM node:lts-alpine #create app directory #xx WORKDIR /usr/src RUN apk add –no-cache bash git RUN touch […]

Categories
Mastering Development

Cannot find module ‘class-transformer’ or its corresponding type declarations

I am trying to use the class-transformer package with NestJS v7. The class-transformer package was installed with npm i class-transformer –save. I’ve followed instructions as per readme.md This package does have a typescript definition, I can see it on my filesystem (in the correct directory inside node_modules), VS Code navigates to the definition just fine, […]

Categories
Mastering Development

Yarn “posttest” script does not work if “test” script fails

Well, I have these scripts in my package.json for testing some code in NodeJS. "scripts": { "pretest": "env NODE_ENV=test sequelize db:migrate", "test": "jest", "posttest": "env NODE_ENV=test sequelize db:migrate:undo:all" } When the tests go clear, the "posttest" runs, but when the tests fail, I receive a error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run […]

Categories
Mastering Development

In my react-native application I’m facing an error of > Task :app:mergeDexDebug FAILED

When I install @react-native-firebase/database, @react-native-firebase/app , @react-native-firebase/auth and @react-native-firebase/storage altogether, unistalling either one of them solves the issue but I don’t understand what’s going wrong otherwise as I have to use those packages. The package.json is as follows : { “name”: “ImageExample”, “version”: “0.0.1”, “private”: true, “scripts”: { “android”: “react-native run-android”, “ios”: “react-native run-ios”, “start”: […]

Categories
Mastering Development

Invariant Violation: View config not found for name path. Error related with victory-native

I have a react-native project, after I installed the victory-native package with the dependencies (react-native-svg) I got this error: Image with the error that I got on emulator my package.json is: { “name”: “ProjectName”, “version”: “0.0.1”, “private”: true, “scripts”: { “android”: “react-native run-android”, “ios”: “react-native run-ios”, “start”: “react-native start”, “test”: “jest”, “lint”: “eslint .” }, […]

Categories
Mastering Development

Published npm package does not apply styles

I’m currently working on creating an npm package. Which is basically a React component with added styles using SCSS. When I test it out, the class names are there, but no styles are being applied. Here is the repo for the package. I use a separated webpack config for building the specific folder where the […]