Home Events! Entrance Everyone Wiki Search Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
November 23, 2024 - @790.08 (what is this?)
Forum activity rating: Three Stars Posts: 39/1k.beats Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts    Start New Topic
News: :eyes: ~ Inconvenience is counterculture ~ :eyes:

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  Cannot deploy website?


« previous next »
Pages: [1] Print
Author Topic: Cannot deploy website?  (Read 793 times)
Wildcat
Casual Poster ⚓︎
*


On the internet, no one knows you're a cat!

⛺︎ My Room
StatusCafe: bibliohound
iMood: Bibliohound

View Profile WWW

Joined 2024!
« on: May 01, 2024 @17.25 »

Out of nowhere, my workflow file, which up to this point was the one here, stopped working. It has to do with something regarding Node upgrading from version 16 to version 20. I've gone to the GitHub action here to replace the workflow file with this one. After trying to figure out why it wasn't working, I was able to at least update the actions/checkout@v3 and actions/setup-node@v3 to the 4th version, and use the 2.0.2 version of the GitHub action.
The problem is I still can't deploy my website, and it's because of this error:


I have no idea on what I'm doing here, and some advice on how to fix this mess would be appreciated.
Logged

starbreaker
Sr. Member ⚓︎
****


What good is Heaven if we dare not storm it?

⛺︎ My Room
SpaceHey: Friend Me!

View Profile WWW

First 1000 Members!G4 Club Member!Joined 2023!
« Reply #1 on: May 01, 2024 @662.19 »

It looks like Node.js is trying to tell you what's wrong: it can't seem to find the package.json file for your site any longer after migrating from Node.js 16 to 20.

What's the URL for your github repo?
« Last Edit: May 01, 2024 @664.49 by starbreaker » Logged

Wildcat
Casual Poster ⚓︎
*


On the internet, no one knows you're a cat!

⛺︎ My Room
StatusCafe: bibliohound
iMood: Bibliohound

View Profile WWW

Joined 2024!
« Reply #2 on: May 01, 2024 @894.19 »

It looks like Node.js is trying to tell you what's wrong: it can't seem to find the package.json file for your site any longer after migrating from Node.js 16 to 20.

What's the URL for your github repo?

I see! My GitHub repo is here, just made it public earlier. I never had a package.json file, as the deployment tutorial I use never specified to make one.
« Last Edit: May 01, 2024 @906.90 by Wildcat » Logged

starbreaker
Sr. Member ⚓︎
****


What good is Heaven if we dare not storm it?

⛺︎ My Room
SpaceHey: Friend Me!

View Profile WWW

First 1000 Members!G4 Club Member!Joined 2023!
« Reply #3 on: May 01, 2024 @918.56 »

If you run
Code
npm install
locally, it should create a package.json file for you. You can then commit it to your repository. I'm surprised the instructions you've followed didn't mention that.
Logged

Wildcat
Casual Poster ⚓︎
*


On the internet, no one knows you're a cat!

⛺︎ My Room
StatusCafe: bibliohound
iMood: Bibliohound

View Profile WWW

Joined 2024!
« Reply #4 on: May 02, 2024 @61.30 »

If you run
Code
npm install
locally, it should create a package.json file for you. You can then commit it to your repository. I'm surprised the instructions you've followed didn't mention that.

I did that, still didn't work. I likely didn't install it to the right place. Where is the .json file supposed to go?

Here's the latest action deployment of my repository, if that helps.
Logged

rhenn
Casual Poster ⚓︎
*


⛺︎ My Room
StatusCafe: rhenn

View Profile WWW

Joined 2024!
« Reply #5 on: May 02, 2024 @144.95 »

Do you have nvm installed? It might not ideal but if you're deploying locally you can specify which version of node to use.
Logged

starbreaker
Sr. Member ⚓︎
****


What good is Heaven if we dare not storm it?

⛺︎ My Room
SpaceHey: Friend Me!

View Profile WWW

First 1000 Members!G4 Club Member!Joined 2023!
« Reply #6 on: May 02, 2024 @192.73 »

I did that, still didn't work. I likely didn't install it to the right place. Where is the .json file supposed to go?

Here's the latest action deployment of my repository, if that helps.

OK, I gave you the wrong command. It's been a while since I've had to deal with node.js at my day job and I never use it for my own stuff.

The command I should have given you was "npm init". You need to run that in your project's base directory, on the same level as the "public/" folder. It will ask you a few questions and then create a basic package.json file.

You can also use "npm init --yes". More details at https://docs.npmjs.com/creating-a-package-json-file#creating-a-default-packagejson-file
Logged

Wildcat
Casual Poster ⚓︎
*


On the internet, no one knows you're a cat!

⛺︎ My Room
StatusCafe: bibliohound
iMood: Bibliohound

View Profile WWW

Joined 2024!
« Reply #7 on: May 02, 2024 @524.48 »

Do you have nvm installed? It might not ideal but if you're deploying locally you can specify which version of node to use.

I installed it just now.

OK, I gave you the wrong command. It's been a while since I've had to deal with node.js at my day job and I never use it for my own stuff.

The command I should have given you was "npm init". You need to run that in your project's base directory, on the same level as the "public/" folder. It will ask you a few questions and then create a basic package.json file.

You can also use "npm init --yes". More details at https://docs.npmjs.com/creating-a-package-json-file#creating-a-default-packagejson-file

It kind of helped. Now I have a different error, something about needing a build script. Running "npm build" doesn't work. I have no idea on how to make a build script, and there is no clear answer on how to make one when I Google it. The latest deployment is here.


Logged

starbreaker
Sr. Member ⚓︎
****


What good is Heaven if we dare not storm it?

⛺︎ My Room
SpaceHey: Friend Me!

View Profile WWW

First 1000 Members!G4 Club Member!Joined 2023!
« Reply #8 on: May 02, 2024 @626.18 »

I installed it just now.

It kind of helped. Now I have a different error, something about needing a build script. Running "npm build" doesn't work. I have no idea on how to make a build script, and there is no clear answer on how to make one when I Google it. The latest deployment is here.

This is getting more complicated than I'd like, and I'm reluctant to make further suggestions because I don't actually use this myself and I don't want to make things even worse for you. Have you tried contacting the person who maintains this script?
Logged

Wildcat
Casual Poster ⚓︎
*


On the internet, no one knows you're a cat!

⛺︎ My Room
StatusCafe: bibliohound
iMood: Bibliohound

View Profile WWW

Joined 2024!
« Reply #9 on: May 02, 2024 @918.58 »

This is getting more complicated than I'd like, and I'm reluctant to make further suggestions because I don't actually use this myself and I don't want to make things even worse for you. Have you tried contacting the person who maintains this script?

I did. I thought he gave up on me, but it turns out he was nice enough to make a fork of my repository and help me out! It still is giving me an error, but I feel more comfortable asking him for further help.

Thank you guys for helping me out as well!
« Last Edit: May 02, 2024 @922.85 by Wildcat » Logged

Pages: [1] Print 
« previous next »
 

Vaguely similar topics! (3)

Website size

Started by RolyBoard ✁ ∙ Web Crafting

Replies: 61
Views: 9204
Last post November 07, 2024 @539.79
by Turboblack
Website example page

Started by Icey!Board ☆ ∙ Showcase & Links

Replies: 3
Views: 2347
Last post December 16, 2021 @285.10
by cinni
Website status (Check replies for part 2)

Started by Icey!Board ☆ ∙ Showcase & Links

Replies: 8
Views: 2620
Last post December 26, 2021 @841.50
by Icey!

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi