lerna bootstrap info undefined#undefined~postinstall: undefined#undefined - npm-install

I have 3 repositry, react components, ts utils and react app, when I use lerna to manage them, it happens. I'm not very familiar with lerna, I want to know why it hapeened and how can I solve it.
learn repo issue has no problem like this

Add "name" property to package.json.
Same Issue is here.
"npm ci" throws exception: Cannot read property 'length' of undefined

Related

getCustomRepository returns a repository object with `this` being undefined when entities and repositories come from an npm package

I've moved my TypeORM entities, migrations and repositories to a shared npm package.
When using this package I'm trying to do const repo = getCustomRepository(MyRepo)
However, it appears that the repo has this as undefined. And I'm getting errors like TypeError: Cannot read properties of undefined (reading 'find').
Basically the same issue as in this Reddit thread: https://www.reddit.com/r/typescript/comments/p8932l/this_is_undefined_on_typeorm_custom_repository/
I'm not using NestJS in my case.
Does someone have a clue about what's going on and how to make it work?

Invariant Violation: Module JSTimers is not a registered callable module(calling callTimers).Issue due to device-info package in lerna setup

React Native version:
0.64.0
Steps To Reproduce
[Repo-code]https://github.com/rsoni5519/lerna-react-native
Please use above link and follow the steps described in README.
Expected Results
The App should work when we are clicking on Track buttons. it should console values for respective button events.
userAgent and screenSize should work for DeviceInfo and Dimensions.
Module_JsTimer_Issue
steps to reproduce
Error occurred because of cyclic dependency of react-native pakcage.
Use this repository for solution [a link] (https://github.com/vishalkhoje/cyclicImportReactNative)!
Here problem is install react-native-device-info package as
dependency into your root project not in your custom package.
In your custom package use react-native-device-info adn react-native as a peer dependancy.
Ex. This is in your custom package.json file, important is version of package is same as root project package.json file.
"peerDependencies": {
"react-native": "^0.64.1",
"#types/react-native": "^0.64.5",
"react-native-device-info": "^8.1.2"
}
This will solve your problem.
![Output screenshot:]

Getting error Invariant Violation: Tried to register two views with the same name

I have used react-native when it was 0.50 now I'm using it again and it's 0.61.1
I am making an app and using "react-navigation" library for routing.
Since I'm using the react-native-gesture-handler according to the documentation I'm getting the error sometimes of "Invariant Violation: Tried to register two views with the same name" and when I close the app and reopen it, it's gone.
And especially "Invariant Violation: Tried to register two views with the same name gestureHandlerRootView" error comes so many times in-app.
here is the screenshot of error in my console:
And because of this error, My app in release mode is also crashing as soon as I open it. I'm using React Native CLI not EXPO. I've searched in stack overflow and on other places but all the answers I got are saying remove react-native-gesture-handler from the expo.
But I'm not using EXPO what should I do? Please help.
I ran
npm ls react-native-webview
and was showed:
├─┬ react-native-webview-leaflet#5.0.2
│ └── react-native-webview#8.2.1
└── react-native-webview#11.0.2
Two webview.
I solve with:
yarn add react-native-webview-leaflet
That is, I had to reinstall 'react-native-webview-leaflet' probability because an update of 'react-native-webview'.
Try to do find . -name react-native-{name-of-the-package} and look for duplicates. They are probably detected and loaded each time (by use_native_modules), which leads to this error.
Try adjusting your dependencies (and look for deps of deps) to avoid such duplicated. At the end your adjustment should be visible in your lock file.

Nuxt generate show error: Cannot read property 'normalModuleFactory' of undefined

Recently I upgrade Nuxt from 1.4.0 to 1.2.x and Vuetify from 1.0.9 to 1.2.x. After that npm run dev works fine. but when I run Nuxt generate I get below error. I am stuck on this error since last night and can't find any idea why it's occurring. Any guidance will be helpful. Thank in advance.
nuxt:build Generating files... +138ms
nuxt:build Generating routes... +13ms
nuxt:build Building files... +314ms
ERROR
TypeError: Cannot read property 'normalModuleFactory' of undefined
- IgnorePlugin.js:96 IgnorePlugin.apply
[vue]/[webpack]/lib/IgnorePlugin.js:96:18
- Tapable.js:375 Compiler.apply
[npm]/[nuxt]/[tapable]/lib/Tapable.js:375:16
- webpack.js:33 webpack
[npm]/[nuxt]/[webpack]/lib/webpack.js:33:19
- builder.js:524 compilers.compilersOptions.map.compilersOption
[npm]/[nuxt]/lib/builder/builder.js:524:24
- Array.map
- builder.js:523 Builder.webpackBuild
[npm]/[nuxt]/lib/builder/builder.js:523:39
- builder.js:168 Builder.build
[npm]/[nuxt]/lib/builder/builder.js:168:16
package.json can be find here.
nuxt.config.js can be found here.
I tried to dig about it, but it seems to be generated through webpack. So I updated to webpack 4 too. But still it's throwing this error.
If you need any more details, I would be happy to provide.
After a long talk with developer community of nuxtjs. Here is solution.
This problem occur when we try to run nuxt generate but our local nuxt version !== global nuxt version.
So solution is either update global nuxt version by npm i -g nuxt or run project from local nuxt version node_modules/.bin/nuxt generate

Upgrade to react-native 0.16 error

I upgraded my app from react-native 0.15 to 0.16 but after that I'm getting an error and I don't know how to solve it.
TypeError:undefined is not an object (evaluating 'GLOBAL.Text={
get defaultProps(){
throw getInvalidGlobalUseError('Text')}}')
In Chrome Debugger:
Uncaught Error: Uncaught TypeError: Cannot set property 'Text' of undefined
Thanks
OBS: I'm running on Android.
I notice that changing app name solves the problem, I'm using Evently as app name today. I tried to recreate my virtual machine but didn't solve it.
In my case, I was able to narrow the cause down to one item in my .babelrc file:
{
"presets": ["es2015"]
}
As soon as I removed that and restarted the packager (making sure to also use the --reset-cache flag), I stopped getting the error.
Update 2:
It looks like React Native is making some changes to their .babelrc in version 0.20.0. So, if you are using that version or newer, you should follow the instructions at: https://github.com/facebook/react-native/tree/master/babel-preset in order to specify your .babelrc settings.
Update:
I've narrowed this down further to transform-es2015-modules-commonjs, which React-Native sets some options on, specifically {"strict": false, "allowTopLevelThis": true}. The es2015 preset does not set this option, and it seems that the React-Native .babelrc does not override it. If you want to use es6 modules and transform them to commonjs, you'll need to put the following in your .babelrc:
{
"plugins": [
["transform-es2015-modules-commonjs", {"strict": false, "allowTopLevelThis": true}]
]
}
Note, Babel 6, which I updated to along with react-native 0.16.0, no longer contains any transforms by default. What I didn't initially realize is that the React-Native packager provides most of the transforms you might ever need (listed in their docs at: https://facebook.github.io/react-native/docs/javascript-environment.html#javascript-syntax-transformers), and I'm thinking that the "es2015" plugin interferes with some of those transformers.
I also tried using "babel-preset-react" (http://babeljs.io/docs/plugins/preset-react/), and that plugin did not seem to cause any errors.
I solve the problem. I think it was because permissions in project folder. I ran chown in my folder to correct the permissions problems and now all are working.
Thanks
In my case the problem was a rogue .babelrc two folders up (my root code folder); I had initiated a yeoman generator to scaffold out a new project using babel-6...accidentally running yeoman from the root code folder. Apparently babel traversed upwards from my project folders until it hit this .babelrc which borked the react-native babel configs...
^ this was originally an edit to my initial answer, which was deleted WHILE I WAS UPDATING IT