React native is hanging while running create-react-native-app <Project_name> - node.js

I'm using:
Nodejs 6
Windows 7
When trying to install create-react-native-app I get the following error:
Using package manager as npm with npm interface.
Installing packages. This might take a couple minutes.
Installing react-native-scripts...
npm WARN deprecated socks#1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
[......] | extract:#expo/ngrok-bin-linux-arm64: sill pacote #expo/n

Related

Can't get create-react-app to work on Linux mint 21

I am trying to get a simple create-react-app to work, but nothing seems to work. With Linux Mint the terminal sends few warnings but can't get the create-react-app to function.
~/Documents/Code$ npx create-react-app testreact Creating a new React
app in /home/omistaja/Documents/Code/testreact.
Installing packages. This might take a couple minutes. Installing
react, react-dom, and react-scripts...
npm WARN deprecated stable#0.1.8: Modern JS already guarantees
Array#sort() is a stable sort, so this library is deprecated. See the
compatibility table on MDN:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated rollup-plugin-terser#7.0.2: This package has been
deprecated and is no longer maintained. Please use
#rollup/plugin-terser npm WARN deprecated w3c-hr-time#1.0.2: Use your
platform's native performance.now() and performance.timeOrigin. npm
WARN deprecated sourcemap-codec#1.4.8: Please use
#jridgewell/sourcemap-codec instead npm WARN deprecated svgo#1.3.2:
This SVGO version is no longer supported. Upgrade to v2.x.x.
added 1415 packages, and audited 1416 packages in 41s
231 packages are looking for funding run npm fund for details
6 high severity vulnerabilities
To address all issues, run: npm audit fix
Run npm audit for details.
A template was not provided. This is likely because you're using an
outdated version of create-react-app. Please note that global installs
of create-react-app are no longer supported. You can fix this by
running npm uninstall -g create-react-app or yarn global remove
create-react-app before using create-react-app again.**
Running the audit fix returns
up to date, audited 101 packages in 1s
20 packages are looking for funding run npm fund for details
found 0 vulnerabilities
In addition to the warnings the terminal does not start the "quick tips" part (which starts with npm start and ends in Happy hacking!)
The created folder only contains following
node_modules (folder)
package.json
package-lock.json
with windows the folder also contains
public
src
.gitignore
README.md
going to the folder and running npm start returns Missing script error (which is to be found in the comments)
I am using running
Linux mint 21
node v18.14.1.
npm v. 9.3.1.
I have uninstalled and removed couple of times and nothing seems to fix that.
I also tested my commands with windows Git Bash (i have a dual-boot machine) and seems to work fine with the commands I am giving it.
Any ideas?
Not sure what the specific problem was but fixed it bt restoring the system to a few days back (before started working on updating the node.js to current version and trying to create-react-app for the first time).
After restoring the system I did a fresh autoremove on the node and install to the current nodejs version 18.14.1. it all just worked.

Updating npm version after downgrading

I had installed the latest version of node.js version 10.16.3 and had the latest version of npm version 6.9.0
I am currently following a course on node.js and the instructor recommended to downgrade to npm version 5.5.1 to have the same version as him for the course so I did that.
Now version 5.5.1 is not supported in the latest release of node.js and if I try to run any npm commands including updating the version globally it throws the same error as shown below.
I have already tried the following:
Running npm i -g npm#latest which throws the same error as below. Basically any npm command throws that error
Completely uninstalling and reinstalling node.js however the version of npm is still 5.5.1 and not the latest
This is the error message that I get when running any npm command
npm WARN npm npm does not support Node.js v10.16.3
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8.
npm WARN npm You can find the latest version at https://nodejs.org/
WARNING: You are likely using a version of node-tar or npm that is incompatible with this version of Node.js.
Please use either the version of npm that is bundled with Node.js, or a version of npm (> 5.5.1 or < 5.4.0) or node-tar (> 4.0.1) that is compatible with Node.js 9 and above.
npm[5864]: c:\ws\src\node_zlib.cc:551: Assertion `args.Length() == 7 && "init(windowBits, level, memLevel, strategy, writeResult, writeCallback," " dictionary)"' failed.
1: 00007FF7DC7ADD8A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4506
2: 00007FF7DC788886 node::MakeCallback+4534
3: 00007FF7DC78893F node::MakeCallback+4719
4: 00007FF7DC6E791D RSA_meth_get_flags+93021
5: 00007FF7DCCB5BF2 std::vector<v8::internal::compiler::MoveOperands * __ptr64,v8::internal::ZoneAllocator<v8::internal::compiler::MoveOperands * __ptr64> >::_Umove+79442
6: 00007FF7DCCB707D std::vector<v8::internal::compiler::MoveOperands * __ptr64,v8::internal::ZoneAllocator<v8::internal::compiler::MoveOperands * __ptr64> >::_Umove+84701
7: 00007FF7DCCB60D6 std::vector<v8::internal::compiler::MoveOperands * __ptr64,v8::internal::ZoneAllocator<v8::internal::compiler::MoveOperands * __ptr64> >::_Umove+80694
8: 00007FF7DCCB5FBB std::vector<v8::internal::compiler::MoveOperands * __ptr64,v8::internal::ZoneAllocator<v8::internal::compiler::MoveOperands * __ptr64> >::_Umove+80411
9: 000001F722E5C5C1
I have run into the exact same problem when following the same course. I managed to fix it by uninstalling node as well as all npm files on the machine, and reinstalling node from scratch. Specifically, I managed to uninstall node and npm by following this answer.
How to completely remove node.js from Windows
i very strongly recommend to all developers who use node, to use nvm
we use nvm to very quickly switch which version of node we're using
after you use nvm to install your favorite version of node, you can upgrade npm easily with npm itself, like so
npm install -g npm#latest
instead of latest, you can specify an exact version number, like so
npm install -g npm#5.5.1
edit: i just re-read your post and see that you're specifically having troubles installing that old verison of npm with that specific version of node
consider just using whichever version of npm that particular version of node uses
also, poke and prod your instructor to "get with it", there is no excuse β€” using unsupported software, ESPECIALLY npm, is a TERRIBLE idea because of gaping security holes in older versions
this is software that downloads and auto-executes thousands of open source software packages, almost without any security measures -- you'd better be doing this in a throwaway virtualmachine if you're going to be using unpatched old versions of this software
again, you should shame your instructor about this, and educate them about the importance of staying on supported channels, and how to use nvm to make it easy as cake
cheers
πŸ‘‹ Chase

npm install hangs with last statement as extract:npm: sill extract npm#^5.3.0 extracted to /<packageLocation>

I am setting up my git project again and it is getting stuck at npm install step as shown below:
npm WARN deprecated socks#1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
β–‘β–‘β–‘β–‘β–‘β–‘βΈ© β ΄ extract:npm: sill extract npm#^5.3.0 extracted to /
PFB my npm setup:
Node version: 10.16.0
npm version: 6.9.0
I have already tried below solutions but none worked:
Changing npm config from https to http
Disabling firewall
Updating and Reinstalling npm and node
setting postBuffer for git config
I've resolved the same problem by administration privileges for terminal where npm runs.

Unable to install Foundation 6 cli when bower problem

I have installed foundation 6 already on a computer a while ago and worked fine however I am trying on another computer and I get this messages. I am not a code or computer wizard. I would appreciate if someone could help me with what I need to do exactly with this so I can continue working on my website.Thank you in advance. I have git and node.js installed as per zurb foundation 6 installation guide.
Trying to install cli on windows 10 and even try on mac no result does not work. use sublime text 3
C:\Users\coco>npm install -g foundation-cli
npm WARN deprecated bower#1.8.8: We don't recommend using Bower for
new projects. Please consider Yarn and Webpack or Parcel. You can read
how to migrate legacy project here:
https://bower.io/blog/2017/how-to-migrate-away-from-bower/
[..................] - fetchMetadata: WARN deprecated bower#1.8.8: We
don't recommend using Bower for new projects. Please consider Yarn and
Webpack or Parcel. You can read how to migrate legacy project here:
https://bower.io/blog/2017/how-npm WARN deprecated graceful-fs#3.0.11:
please upgrade to graceful-fs 4 for compatibility with current and
future versions of Node.js npm WARN deprecated natives#1.1.6: This
module relies on Node.js's internals and will break at some point. Do
not use it, and update to graceful-fs#4.x.
C:\Users\coco\AppData\Roaming\npm\foundation ->
C:\Users\coco\AppData\Roaming\npm\node_modules\foundation-cli\bin\foundation.js
+ foundation-cli#2.2.5 added 323 packages from 529 contributors in 301.497s
C:\Users\coco>npm install --global foundation-cli
npm WARN deprecated bower#1.8.8: We don't recommend using Bower for
new projects. Please consider Yarn and Webpack or Parcel. You can read
how to migrate legacy project here:
https://bower.io/blog/2017/how-to-migrate-away-from-bower/ npm WARN
deprecated graceful-fs#3.0.11: please upgrade to graceful-fs 4 for
compatibility with current and future versions of Node.js npm WARN
deprecated natives#1.1.6: This module relies on Node.js's internals
and will break at some point. Do not use it, and update to
graceful-fs#4.x. C:\Users\coco\AppData\Roaming\npm\foundation ->
C:\Users\coco\AppData\Roaming\npm\node_modules\foundation-cli\bin\foundation.js
+ foundation-cli#2.2.5 updated 3 packages in 18.851s
These are just warnings, foundation should be globally available now.

Angular 5 new, clean project, Firefox error

I created a new project named company, like angular.io tutorial says.
ng company
cd company
ng serve --host example.com
When I open example.com:4200 with chrome it works fine.
when I try with Firefox, I get the following error in console:
UPDATE: Error as text:
[WDS] Disconnected! index.js:176:5
close webpack-internal:///./node_modules/webpack-dev-server/client/index.js:176:5
onclose socket.js:17
[5]</EventTarget.prototype.dispatchEvent sockjs.js:170
[14]</</SockJS.prototype._close/< sockjs.js:965
ZoneDelegate.prototype.invokeTask zone.js:421
Zone.prototype.runTask zone.js:188
ZoneTask.invokeTask zone.js:496
ZoneTask/this.invoke zone.js:485
timer zone.js:2054
Firefox version: 59.0.2 (64 bits)
The project is new, I didn't add any line of code, it just disconnects in firefox.
When I created the project I got these warnings:
npm WARN deprecated nodemailer#2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead.
npm WARN deprecated socks#1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated socks#1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm WARN deprecated mailcomposer#4.0.1: This project is unmaintained
npm WARN deprecated buildmail#4.0.1: This project is unmaintained
npm WARN prefer global node-gyp#3.6.2 should be installed with -g
I tried to install e newer version of socks, but didn't help:
Any ideas why it gets disconnected?
Thanks

Resources