configure unicode-match-property-value-ecmascript on reactjs - reactjs

I am trying to run REACT frontend and Flask backend using concurrently but every time I run it I get this error
Error: Cannot find module 'unicode-match-property-value-ecmascript'
I have tried installing the dependency using
npm install unicode-match-property-value-ecmascript
But I get this error on vscode powershell
npm ERR! code UNKNOWN
npm ERR! syscall rename
Any help will be appreciated

Related

issue deploying to vercel, works on local?

Trying to my Next.js app using vercel, have tried both the cli and web app. Either way, not working. Error log:
2022-04-18T00:57:21.354Z Retrieving list of deployment files...
2022-04-18T00:57:23.121Z Downloading 29 deployment files...
2022-04-18T00:57:24.298Z Installing build runtime...
2022-04-18T00:57:27.316Z Build runtime installed: 3.018s
2022-04-18T00:57:27.999Z Looking up build cache...
2022-04-18T00:57:28.609Z Build Cache not found
2022-04-18T00:57:28.805Z Installing dependencies...
2022-04-18T00:57:30.687Z npm ERR! code ENOLOCAL
2022-04-18T00:57:30.692Z npm ERR! Could not install from "node_modules/eth-sig-util/ethereumjs-abi#git+https:/github.com/ethereumjs/ethereumjs-abi.git" as it does not contain a package.json file.
2022-04-18T00:57:30.713Z
2022-04-18T00:57:30.713Z npm ERR! A complete log of this run can be found in:
2022-04-18T00:57:30.713Z npm ERR! /vercel/.npm/_logs/2022-04-18T00_57_30_693Z-debug.log
2022-04-18T00:57:30.725Z Error: Command "npm install" exited with 1
2022-04-18T00:57:31.523Z
Not sure what is causing this. I am able to npm run dev on local and everything works correctly. I am also able to npx next build and that works fine too. Any ideas how to fix this issue? Thanks

Create-react-app dependency version issues

I am trying to create a basic react app using the command:
npx create-react-app my-app
At work we use JFrog Artifactory to manage our npm packages. When trying to use the above command, I get the following error:
npm ERR! 403 403 Forbidden - GET https://artifactory.XYZ.domain:443/artifactory/api/npm/npm-main/ansi-regex/-/ansi-regex-4.1.0.tgz
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy.
npm ERR! 403
npm ERR! 403 It was specified as a dependency of 'wrap-ansi'
Sure enough, when I look in Artifactory I can see that v4.0.1 is blocked due to a security vulnerability. What are my options here please? Is it possible to somehow force create-react-to instead use a later version without the vulnerability (looks like v5.0.1 is fine)?
Thanks for your help
you can do
npm config set registry <path/to/artifactory>
///create your react project:- npm create-react-app myapp
//then revert to older config if you want to by
npm config delete registry
let me know if it works

(error) AWS as backend installing amplify libraries

I am new to backend. Just starting to make a To-Do app in react and was just setting up amazon aws for backend. Using this site for reference ( https://docs.amplify.aws/start/getting-started/setup/q/integration/react#initialize-a-new-backend ).
And at the point Install Amplify libraries I got stuck while i type npm install aws-amplify #aws-amplify/ui-react in root directory it shows me error everytime.[error pic][1] I am trying for a long but did not find any solution. Pls help me in this issue !!
[1]: https://i.stack.imgur.com/hrSeJ.png Here is the error i'm getting in command prompt👇
npm ERR! Unexpected end of JSON input while parsing near '...:"^1.0.0-beta.2","#aw'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Aakash~1Bansal\AppData\Roaming\npm-cache\_logs\2021-04-09T11_41_43_000Z-debug.log
F:\Learning- tanay pratap\AWS\react-amplified>npm install aws-amplify #aws-amplify/ui-react
npm ERR! Unexpected end of JSON input while parsing near '...:"^1.0.0-beta.2","#aw'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Aakash~1Bansal\AppData\Roaming\npm-cache\_logs\2021-04-09T11_45_14_875Z-debug.log
F:\Learning- tanay pratap\AWS\react-amplified>
I was having the same issue. 1st make sure your PC is connected to internet connection. Run:
npm uninstall -g #aws-amplify/cli
npm install -g #aws-amplify/cli
If possible don't minimize the window wait till everything is properly install.
This worked for me.
Still you are facing problems then reinstall node.js and then do this.
Thank you!

Cannot Resolve firebase in my application

So I'm developing an app using firebase and react, and when I run npm start to test the app, I get a lot of errors including this
./src/Login.js
Module not found: Can't resolve 'firebase' in '/Users/.../.../.../.../project/src
And this (the full error is too large to show, but here's the end snippet):
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc#1.23.3 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc#1.23.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Here is the import statement in Login.js
import * as firebase from "firebase";
Its important to note that I'm working with friends on this application and they can run this app using npm start without any issues and even build and deploy to firebase hosting using the exact same code I have. In addition, I can run the template React app created via create-react-app without any issue. Because of this, I thought it was either a problem with my NPM install or my Firebase install, so I re-installed both, but that changed nothing. I'm honestly stuck and I would really appreciate any help.

How develop node modules locally using npm link in react project

I want to add my custom build botframework-webchat in reactproject
I have tried adding using npm link.I get the following Error
Vostro-270s:~/React/Botframework webchat/chatbot$ npm link ./BotFramework-WebChat-3
npm ERR! code EINVALIDTYPE
npm ERR! typeerror Error: Argument #2: Expected array but got string
npm ERR! typeerror at EventEmitter.install (/usr/local/lib/node_modules/npm/lib/install.js:190:3)
npm ERR! typeerror at Object.commandCache.(anonymous function) (/usr/local/lib/node_modules/npm/lib/npm.js:156:13)
npm ERR! typeerror at /usr/local/lib/node_modules/npm/lib/link.js:93:24
npm ERR! typeerror at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:282:31
npm ERR! typeerror at FSReqWrap.oncomplete (fs.js:152:21)
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! /home/.npm/_logs/2019-07-16T11_35_13_546Z-debug.log
I have My BotFramework-WebChat-3 and My React app in a folder.
I'm tring to integrate Microsoft Botframework in my react app.
https://github.com/microsoft/BotFramework-WebChat
* Hard: In your React website, incorporate a custom build of the Web Chat component *
The simplest approach is to clone (or fork) this repo, alter it, build it, then reference your local build in your project's package.json as follows:
dependencies: {
...
'botframework-webchat': 'file:/path/to/your/repo'
...
}
Running npm install will copy your local repo to node_modules, and import/require references to 'botframework-webchat' will resolve correctly.
You may also wish to go so far as to publish your repo as its own full-fledged, versioned npm package using npm version and npm publish, either privately or publicly.
Different projects have different build strategies, yours may vary considerably from the above. If you come up with a different integration approach that you feel would have broad application, please consider filing a pull request for this README.
try run npm link /path/to/your/repo and don't forget to remove node_modules from your custom repo

Resources