Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6212

Typescript not compiling as custom npm package

$
0
0

Actually I have a project hosted in Bitbucket, this project is using Typescript and is required by my react-native app in his package.json file from this way:

"@core": "git+https://bitbucket.org/agrostydevs/ag-core/src/master/",

@core project contains the following configuration on his tsconfig.json file:

{"compilerOptions": {"target": "es5","module": "commonjs","outDir": "./dist","skipLibCheck": true,"declaration": true,"lib": ["es6", "dom"],"removeComments": true,"isolatedModules": true,"strict": true,  },"include": ["lib"],"exclude": ["node_modules", "**/__tests__/*"]}

This is the package.json of @core project:

{"name": "core","license": "MIT","version": "1.0.0","main": "dist/index.js","author": "Germán Alzate","scripts": {"build": "tsc","prepare": "tsc"  },"devDependencies": {"typescript": "^3.2.2"  },"dependencies": {"@types/lodash": "^4.14.155","@types/node": "10.3.4","@types/react-redux": "^7.1.9","@types/redux": "^3.6.0","@types/redux-logger": "3.0.6","lodash": "^4.17.15","redux": "4.0.0","redux-logger": "3.0.6","redux-thunk": "^2.3.0"  }}

My project map directory on @core project is this.

- lib/    - actions/        - index.ts    - reducers/        - index.ts    - services/        - index.ts    - entities/        - index.ts    - common/        - index.ts    - config.ts    - index.ts- package.json- tsconfig.json

Son each time I call yarn upgrade @core on my react-native project, it does not compile on dist directory. When I log ls node_modules/@core/dist only appear the index.js requiring all other folders and files, but those files and folders does not appear so the app throws error trying to get those files

Can anyone help me? Any additional info just please comment


Viewing all articles
Browse latest Browse all 6212

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>