i just did ( npm audit fix ) in my porject and after that im getting this error .
error:
Error: Unable to resolve module fbjs/lib/invariant from C:\Users\HP\Desktop\NoumanTestingApp-master\node_modules\react-native-reanimated\src\createAnimatedComponent.js: fbjs/lib/invariant could not be found within the project or in these directories:s:413:43)
node_modulesresolve (C:\Users\HP\Desktop\NoumanTestingApp-master\node_modules\metro\src\lib\transformHelpers.js:317:42
....\node_modules
at resolve (C:\Users\HP\Desktop\NoumanTestingApp-master\node_modules\metro\src\DeltaBundler\traverseDependencies.js:
If you are sure the module exists, try these steps:
Clear watchman watches: watchman watch-del-all\node_modules\metro\src\DeltaBundler\traverseDependencies.js:645:26
Delete node_modules and run yarn install
Reset Metro's cache: yarn start --reset-cacheoumanTestingApp-master\node_modules\metro\src\DeltaBundler\traverseDepe
Remove the cache: rm -rf /tmp/metro-*
10 | import setAndForwardRef from './setAndForwardRef';odules\metro\src\DeltaBundler\traverseDependencies.js:329:33
11 | Generator.next (<anonymous>)
12 | import invariant from 'fbjs/lib/invariant';manTestingApp-master\node_modules\metro\src\DeltaBundler\traverseDepen
| ^
13 | import { adaptViewConfig } from './ConfigHelper';d. Please run:
14 | import { RNRenderer } from './reanimated2/platform-specific/RNRenderer';
15 |orm[stderr]:
i try npm install fbjs but it doesn't work for me
When using yarn workspaces is it possible to have nested package.json files to resolve dependancies for a subset of packages? Avoiding repetition?
where cra are create-react-apps and pkg are packages that these sites consume.
e.g.
| /
| - package.json
|---- /sites
|-------- /cra-1
| - package.json
|-------- /cra-2
| - package.json
|---- /packages
| - package.json // <<---- Extra level here
|-------- /pkg-1
| - package.json
|-------- /pkg-1
| - package.json
|-------- /pkg-2
| - package.json
this would allow us to share common dependancies for our packages... keep them all in sync and up-to-date
I have an electron app with the following structure
- dist
| - index.html
| - node_modules
| - nm (is an exact copy of node_modules)
- package.json
| ...
if I refer to the node modules in my index.html as node_modules/module the app won't find the module if built with the build command from electron-builder. But if I change that line in my index.html to nm/module it is perfectly willing to load it.
It seems to me that electron-builder isn't copying node_modules into the application, but I can't see why it would do that. Is it excluding all folders named node_modules and how can I fix this?
I'm building fist mobile project by using react-native, expo and lerna. But I have problem with lerna. When I type: yarn install all packages. My problem is that lerna push all module packages in mobile package to the outside node_modules folder so that the script to run react native is not available in mobile package. My question is that there are any solutions for lerna to recognize those modules out of package mobile scope.
This is my folder structure
| my-project/
| ---- node_modules/
| -------- react-native/
| -------- lerna/
| -------- expo/
| ---- package.json
| ---- lerna.json
| ---- packages/
| -------- mobile/
| ------------ node_modules/
| ---------------- bin/
| ------------------- react-native
| ------------------- react-native.cmd
| ------------ package.json
On Windows, I am trying to update ChromeDriver to take advantage of the new headless option for Chrome. However, ChromeDriver reverts back to a previous version as soon as the update is complete.
In the console log from command prompt below, you can see that I downloaded version 2.33, but at the end, the version I get is 2.27. I need at least 2.29 to use headless Chrome.
C:\WINDOWS\system32>npm uninstall chromedriver
- pify#2.3.0 node_modules\globby\node_modules\pify
- globby#6.1.0 node_modules\globby
- isarray#1.0.0 node_modules\isarray
- minimist#0.0.8 node_modules\minimist
- mkdirp#0.5.0 node_modules\extract-zip\node_modules\mkdirp
- ms#2.0.0 node_modules\ms
- debug#2.6.9 node_modules\debug
- p-map#1.2.0 node_modules\p-map
- pend#1.2.0 node_modules\pend
- fd-slicer#1.0.1 node_modules\fd-slicer
- pify#3.0.0 node_modules\pify
- process-nextick-args#1.0.7 node_modules\process-nextick-args
- string_decoder#1.0.3 node_modules\string_decoder
- typedarray#0.0.6 node_modules\typedarray
- util-deprecate#1.0.2 node_modules\util-deprecate
- readable-stream#2.3.3 node_modules\readable-stream
- concat-stream#1.6.0 node_modules\concat-stream
- yauzl#2.4.1 node_modules\yauzl
- del#3.0.0 node_modules\del
- extract-zip#1.6.6 node_modules\extract-zip
- kew#0.7.0 node_modules\kew
- mkdirp#0.5.1 node_modules\mkdirp
- chromedriver#2.33.2 node_modules\chromedriver
npm WARN enoent ENOENT: no such file or directory, open 'C:\WINDOWS\system32\package.json'
npm WARN system32 No description
npm WARN system32 No repository field.
npm WARN system32 No README data
npm WARN system32 No license field.
C:\WINDOWS\system32>npm install chromedriver
> chromedriver#2.33.2 install C:\WINDOWS\system32\node_modules\chromedriver
> node install.js
Downloading https://chromedriver.storage.googleapis.com/2.33/chromedriver_win32.zip
Saving to C:\Users\vadmin\AppData\Local\Temp\chromedriver\chromedriver_win32.zip
Received 781K...
Received 1568K...
Received 2352K...
Received 3136K...
Received 3920K...
Received 4125K total.
Extracting zip contents
Copying to target path C:\WINDOWS\system32\node_modules\chromedriver\lib\chromedriver
Done. ChromeDriver binary available at C:\WINDOWS\system32\node_modules\chromedriver\lib\chromedriver\chromedriver.exe
C:\WINDOWS\system32
`-- chromedriver#2.33.2
+-- del#3.0.0
| +-- globby#6.1.0
| | `-- pify#2.3.0
| +-- p-map#1.2.0
| `-- pify#3.0.0
+-- extract-zip#1.6.6
| +-- concat-stream#1.6.0
| | +-- readable-stream#2.3.3
| | | +-- isarray#1.0.0
| | | +-- process-nextick-args#1.0.7
| | | +-- string_decoder#1.0.3
| | | `-- util-deprecate#1.0.2
| | `-- typedarray#0.0.6
| +-- debug#2.6.9
| | `-- ms#2.0.0
| +-- mkdirp#0.5.0
| `-- yauzl#2.4.1
| `-- fd-slicer#1.0.1
| `-- pend#1.2.0
+-- kew#0.7.0
`-- mkdirp#0.5.1
`-- minimist#0.0.8
npm WARN enoent ENOENT: no such file or directory, open 'C:\WINDOWS\system32\package.json'
npm WARN system32 No description
npm WARN system32 No repository field.
npm WARN system32 No README data
npm WARN system32 No license field.
C:\WINDOWS\system32>npm update chromedriver
C:\WINDOWS\system32>chromedriver -version
ChromeDriver 2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9)
C:\WINDOWS\system32>
What am I doing wrong/missing?
Most probably you have another chromedriver in your PATH. You can use PATH command in cmd prompt to check if you have another chromedriver in your path. If you have another chromedriver you can either update it manually by downloading the version you want or you can add the one installed by npm to your PATH, which is at following location:
C:\WINDOWS\system32\node_modules\chromedriver\lib\chromedriver
Also, you can check the version of the chromedriver at the above location
C:\WINDOWS\system32>C:\WINDOWS\system32\node_modules\chromedriver\lib\chromedriver --version
When Selenium is installed, the chromedriver.exe is placed in
C:\Users\you\AppData\Local\SeleniumBasic
When you put the updated version somewhere else in %path% then it will still use the old version here.
So
either delete the old one from here
or
overwrite it with the updated version.
This will ensure that the updated one is used.