ocn-tools won't compile after npm install - shareandcharge

I'm having a go with ocn-tools to connect to our ocn-node on the test network.
'npm install' pulls in ocn-registry 1.1.0 and does not compile.
'npm ci' (respecting the lock file) pulls in 0.1.0 and does compile. However, I think the network settings are out of date on this version. Is 0.1.0 now too old to try and get working?

Related

Exit Code 1 when installing react-email-editor

My deployment was working perfectly fine but today for some reason whenever I try to install dependency it then gives me an error
error C:\react\infaque\node_modules\react-email-editor: Command failed.
Exit code: 1
Command: cd demo && npm install
Arguments:
Directory: C:\react\infaque\node_modules\react-email-editor
Output:
The system cannot find the path specified.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
I tried uninstalling node_modules, lock files, changed yarn version, tried different operating systems and tried installing dependencies in node_modules -> react-email-editor folder. But nothing is working.

having an issue creating new react app with create-react-app

I am trying to create a new react project, but when I run npx create-react-app tik-tok-clone I get the following error
Creating a new React app in C:\Users\mwars\Documents\GitHub\TikTok-Clone\tik-tok-clone.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
yarn add v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
error postcss#8.1.3: The engine "node" is incompatible with this module. Expected version "^10 || ^12 || >=14". Got "13.12.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts cra-template --cwd C:\Users\mwars\Documents\GitHub\TikTok-Clone\tik-tok-clone has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting tik-tok-clone/ from C:\Users\mwars\Documents\GitHub\TikTok-Clone
Done.
I've been trying to figure it out for a while now and just can't get it to work.
I am was dealing with the same problem and have managed to understand and fix it. I will try to explain it below.
The issue:
error postcss#8.1.3: The engine "node" is incompatible with this module. Expected version "^10 || ^12 || >=14". Got "13.12.0"
This is telling you that the create_react_app module is only compatible with versions 10, 12, or greater than 14 of node and you are using 13.12.0.
The solution
To fix this error you need to either upgrade or downgrade your current version of node.
One way to do this is to use NVM (node version manager) to manage multiple versions of node.
To install it with either Linux or Mac you can use either of the following commands
For Wget, run the following command on the terminal:
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
For CURL, run the following:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
You will want to change the version number in the commands to the latest stable version.
Once you have downloaded it successfully restart the terminal or you won't be able to find it. If this fails you may need to reset your computer.
If you have NVM installed running the following should show you the current version of it your using.
nvm --version
You can then use the following command to list available versions of node
nvm ls-remote
Select a compatible version and install it like so
nvm install 14.15.0
Running
node -v
Should show this as your current version if not try
nvm use v14.15.0
You should now have no issues running
npx create-react-app tik-tok-clone
It worked for me after running these commands.
sudo npm cache clean -f //clear you npm cache
sudo npm install -g n install n //(this might take a while)
sudo n stable upgrade //to the current stable version

Denial of Service - http proxy - React

I am pretty sure that this error appeared only today and it never occurred before.
When I create a new react app, the process found 1 high vulnerability:
High: Denial of Service
Package: http-proxy
Patched in: No patch available
Dependency of: react-scripts
Path: react-scripts > webpack-dev-server > http-proxy-middleware > http-proxy
More info: https://npmjs.com/advisories/1486
(My version of "react-scripts" is 3.4.1). Of course, "npm audit fix" doesn't work.
What can I do about it? Is it something to care about or I can work normally?
All versions of http-proxy are vulnerable to Denial of Service. An HTTP request with a long body triggers an ERR_HTTP_HEADERS_SENT unhandled exception that crashes the proxy server. This is only possible when the proxy server sets headers in the proxy request using the proxyReq.setHeader function.
For a proxy server running on http://localhost:3000, the following curl request triggers the unhandled exception:
curl -XPOST http://localhost:3000 -d "$(python -c 'print("x"*1025)')"
Remediation
No fix is currently available. Consider using an alternative package until a fix is made available.
Conclusion
But for the time being, you can work normally. It should not cause any type of working anomaly as of now.
Upgrade to http-proxy 1.18.1+ which contains a fix for the security issue detailed. NPM have now updated their security APIs to include the information that this issue is now resolved.
See https://github.com/http-party/node-http-proxy/issues/1446 for more info
first install the package
npm install http-proxy --save-dev
in your package.json file add the following statements
"resolutions" :{
"http-proxy": "^1.18.1"
}
"scripts" :{
"preinstall": "npx npm-force-resolutions"
}
then run the command in the command prompt-
npm install
this might fixed your vulnerability

Module not found: Can't resolve './.htaccss' after installing React-boilerplate Dandelion starter project

I have downloaded Dandelion starter-project and decompressed it on a local folder. I ran:
npm i
npm run build:dll
and then
npm start
then it complains:
> dandelion_pro#1.6.1 start /home/......./dandelion/starter-project
> cross-env NODE_ENV=development node server
Happy[js]: Version: 5.0.1. Threads: 5 (shared pool)
Server started ! ✓
Access URLs:
-----------------------------------
Localhost: http://localhost:3001
LAN: http://xxx.xxx.xxx.xxx:3001
-----------------------------------
Press CTRL-C to stop
Webpack is building script...
Happy[js]: All set; signaling webpack to proceed.
Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
webpack built 920e70412c607c0d50a6 in 3600ms
✖ 「wdm」:
ERROR in ./app/app.js
Module not found: Error: Can't resolve './.htaccess' in '/home/......./dandelion/starter-project/app'
# ./app/app.js 27:0-48
# multi ./node_modules/react-app-polyfill/ie11.js webpack-hot-middleware/client?reload=true ./app/app.js
I have searched the web looking for a solution, but I was unable to find one. My system is a Ubuntu 18.04.3 based machine running Linux Mint 19.3, nodejs 12.15.0 and npm 6.13.4. How can I solve this?
Well folks after an endless unsuccessful search on the web I created an empty ´.htaccess´ file and placed it into the ´app´ folder. Maybe this is not the better or the elegantest way to do it, but it worked for me.
I am posting this hoping it might be helpful.

NPM Install Error - Msnodesql

I'm running npm to install msnodesql, an npm library for sql server drivers. I am installing this on a Windows Server 2012 box.
I have installed Visual C++ 2010, node-gyp and Python 2.7.x.x as dependencies, and all of these installs were successful.
When I run npm install msnodesql, I get a big red error:
(x86)\MSBuild\Microsoft.Cpp\v4.0\Miscrosoft.Cpp.InvalidPlatform.Targets(23,7):
error MSB8007: The Platform for project 'sqlserver.vcxproj' is
invalid. Platform='x64'. You may be seeing this message because you
are trying to build a project without a solution file, and have
specified a non-default Platform that doesn't exist for this project.
My box is 64-bit. Not too experienced in this stuff at all, so though it looks like a platform error, i'm really not sure what to do.
Help!
I got the same error. Turns out I needed to remove my installed node.js (64 bit) and download 32-bit node.js instead. Once I did this I ran node-gyp configure, then node-gyp build with no errors.

Resources