Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tnort's avatar
Level 4

Deploying issue

Hi,

I am trying to deploy a Laravel app on Digital Ocean through git. As it starts deploying I get to the point where: parsing package.json no file to start the server and then get an error which says package-lock.json does not exist.

I would highly appreciate it if anyone could help.

Please, see the error log:

https://i.ibb.co/nkrRrLN/a.png

Thank you!

0 likes
10 replies
Snapey's avatar

Do you have package-json.lock ?

Is it in your repository? Do you have it locally ? Is it necessary to compile assets on deployment?

tnort's avatar
Level 4

@Snapey,

Yes it is in my repo and locally. Just cloned again the repo and configured the app again and all worked locally.

Yes, I do use Vue and have to run npm install; npm run prod but it doesn't even get there :(.

tnort's avatar
Level 4

@Nakov, yes I see it locally and in my remote repo as well.

Nakov's avatar

So do you have npm install step in your deployment script?

tnort's avatar
Level 4

@Nakov,

yes I do use the following commands:

composer install npm install npm run dev

Nakov's avatar

@tudosm don't do npm run dev on production.. Check my comment above.

tnort's avatar
Level 4

@Nakov I have attached a link to an image of my logs.

Yeah, I should have prod but is just testing for now.

Nakov's avatar
Nakov
Best Answer
Level 73

@tudosm so the issue is because you use different versions of npm on your local environment than on the production.

npm -v will tell you which version you use locally, so upgrade whichever uses older version.

1 like
tnort's avatar
Level 4

@Nakov,

That helped thank you so much.

Just figured out I am using locally npm v8+ while Digital Ocean default is still v6.

Please or to participate in this conversation.