Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native Setup #19

Closed
maryjess opened this issue Sep 28, 2024 · 11 comments
Closed

React Native Setup #19

maryjess opened this issue Sep 28, 2024 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@maryjess
Copy link
Owner

No description provided.

@maryjess maryjess changed the title Issue with npm Issue with npm on ubunt Sep 28, 2024
@maryjess maryjess changed the title Issue with npm on ubunt Issue with npm on ubuntu Sep 28, 2024
@maryjess maryjess added the bug Something isn't working label Sep 28, 2024
@maryjess
Copy link
Owner Author

maryjess commented Sep 29, 2024

  • Attempted to reconfigure nodejs and npm

Linux commands ran so far:

sudo apt-get update
sudo apt-get remove nodejs npm
sudo apt-get autoremove
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

@maryjess maryjess changed the title Issue with npm on ubuntu Dependency issue Sep 29, 2024
@maryjess maryjess changed the title Dependency issue Dependency issue on nodejs setu Sep 29, 2024
@maryjess maryjess changed the title Dependency issue on nodejs setu Dependency issue on nodejs setup Sep 29, 2024
@maryjess maryjess pinned this issue Sep 30, 2024
@maryjess maryjess self-assigned this Sep 30, 2024
@maryjess
Copy link
Owner Author

Issue with sudo apt-get install -y nodejs

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nodejs : Depends: libc6 (>= 2.28) but 2.27-3ubuntu1.6 is to be installed
E: Unable to correct problems, you have held broken packages.

@maryjess
Copy link
Owner Author

maryjess commented Oct 4, 2024

  • Make sure that Node.js is installed as a prerequisite — need to update README for setup guide
    Current versions of node and npm:
node -v 👉🏻 v18.14.2
npm -v 👉🏻 9.5.0 
npx -v 👉🏻 10.9.0
  • Updated node to v20.18.0
  • Updated npm to v10.9.0

@maryjess maryjess changed the title Dependency issue on nodejs setup React Native Setup Oct 4, 2024
@maryjess
Copy link
Owner Author

maryjess commented Oct 4, 2024

Error while running npx react-native init exSpent

npm error code ERR_INVALID_URL
npm error Invalid URL
npm error A complete log of this run can be found in: C:\\AppData\Local\npm-cache\_logs\2024-10-04T06_59_56_802Z-debug-0.log

What does ERR_INVALID_URL mean?

The “NPM ERR_INVALID_URL” error occurs when there’s an invalid or incorrect URL present in your project’s configuration or dependencies or that NPM failed to make the URL request.

Troubleshooting

  1. Update to the latest npm version npm install -g npm
  2. Clear npm cache npm cache clean --force
  3. Verify you are using the correct registry npm config set registry https://registry.npmjs.org/
  4. Check that you have a stable internet connection
  5. Disable strict SSL checking npm config set strict-ssl false

@maryjess
Copy link
Owner Author

maryjess commented Oct 4, 2024

moved the exSpent project directory to outside of Linux 🤜🏻 worked!
image
⚛️

@maryjess maryjess closed this as completed Oct 4, 2024
@maryjess maryjess unpinned this issue Oct 4, 2024
@maryjess maryjess reopened this Oct 5, 2024
@maryjess
Copy link
Owner Author

maryjess commented Oct 5, 2024

Read README and verify that project has been setted up

@maryjess maryjess pinned this issue Oct 5, 2024
@maryjess
Copy link
Owner Author

maryjess commented Oct 5, 2024

$ npm start

> [email protected] start
> react-native start

info Welcome to React Native v0.75
info Starting dev server on port 8081...

                        ▒▒▓▓▓▓▒▒
                     ▒▓▓▓▒▒░░▒▒▓▓▓▒
                  ▒▓▓▓▓░░░▒▒▒▒░░░▓▓▓▓▒
                 ▓▓▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▓▓
                 ▓▓░░░░░▒▓▓▓▓▓▓▒░░░░░▓▓
                 ▓▓░░▓▓▒░░░▒▒░░░▒▓▒░░▓▓
                 ▓▓░░▓▓▓▓▓▒▒▒▒▓▓▓▓▒░░▓▓
                 ▓▓░░▓▓▓▓▓▓▓▓▓▓▓▓▓▒░░▓▓
                 ▓▓▒░░▒▒▓▓▓▓▓▓▓▓▒░░░▒▓▓
                  ▒▓▓▓▒░░░▒▓▓▒░░░▒▓▓▓▒
                     ▒▓▓▓▒░░░░▒▓▓▓▒
                        ▒▒▓▓▓▓▒▒


                Welcome to Metro v0.80.12
              Fast - Scalable - Integrated


info Dev server ready

i - run on iOS
a - run on Android
d - open Dev Menu
r - reload app

yay

@maryjess maryjess closed this as completed Oct 5, 2024
@maryjess maryjess unpinned this issue Oct 5, 2024
@maryjess maryjess reopened this Oct 5, 2024
@maryjess maryjess pinned this issue Oct 5, 2024
@maryjess
Copy link
Owner Author

maryjess commented Oct 5, 2024

Troubleshooting — what if my npm start has trouble?

https://chatgpt.com/share/6700f03b-1e14-8007-87fe-0a68e0a13f9f


Log for npm start:

npm error code ENOENT
npm error syscall open
npm error path C:\Users\Jessica Mary\Desktop\package.json
npm error errno -4058
npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open 'C:\Users\Jessica Mary\Desktop\package.json'
npm error enoent This is related to npm not being able to find a file.
npm error enoent
npm error A complete log of this run can be found in: C:\Users\Jessica Mary\AppData\Local\npm-cache\_logs\2024-10-05T07_53_09_566Z-debug-0.log

@maryjess
Copy link
Owner Author

maryjess commented Oct 5, 2024

https://stackoverflow.com/questions/48524417/should-the-package-lock-json-file-be-added-to-gitignore#:~:text=One%20of%20the,manual%20maintenance%20step.

"In the past, I had projects without package-lock.json / npm-shrinkwrap.json / yarn.lock files whose build would fail one day because a random dependency got a breaking update. (While a lot of libraries respect the semvar versioning guideline, you have no guarantee they won't break on a minor upgrade.)"

@maryjess
Copy link
Owner Author

maryjess commented Oct 5, 2024

What I did to solve.....? (WIP)

In any terminal (preferably git bash on the directory outside of exSpent directory), run:

  1. npm install -g npm, then npm update
  2. ensure npx is installed --> ensuring npm is available globally...
  3. (THIS IS RESTARTING the project locally on your machine) npx react-native init exSpent

@maryjess maryjess closed this as completed Oct 6, 2024
@maryjess maryjess unpinned this issue Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant