Updating node modules

I need advice to debug deploy Netlify App

I had the same issue locally and deleting and reinstalling my node modules fixed it

I believe you need to take a look at your dependencies. Do you have a package.json file?

Yep I’ve got a package.json file and I updated the depency “gatsby-source-google-places”: “^0.0.5” which made it work locally. I had to manually delete my node module and install them again though.

Hey @hartey11,

In which case, perhaps try rebuilding with no cache because we cache node_modules between builds :+1:!

Tried that too! No luck

I’d take a look at the debugging site builds doc, making sure that versions you have installed locally marry up with those in our build images.

I’m stuck on step 2 of the build image. how do I find the path so I can change directory?

Still in your Docker terminal, change directories into your local clone of this build-image repository.

Just to confirm all I’ve done is open terminal and then run the command
docker pull netlify/build:xenial

Before you begin working through the steps, you should ensure that you’ve gone ahead and cloned the build-image git repo. Step 2 is just simply asking you to point the docker terminal to the local build-image repo :smile:

How do I check that? As I said before I’ve run docker pull netlify/build:xenial from step one and when I run docker images its lists netlify/build as a repository.

How do I find the local build-image repo so I can point the docker terminal to it?

It has to be a caching issue somewhere. It’s the error I was getting when the dependency gatsby-source-google-places was version 0.0.4. I am able to develop and build locally since the plugin was updated to version 0.0.5, which I have pushed to the repo.

Is there a way to run yarn cache clean and gatsby clean on the server?

I deleted the site and started again on netlify. Same issue, how can I debug the error that I’m getting from the npm package when it works fine on my local version, both developing and building?

hey @hartey11 - sorry to be slow in getting back to you. Are you still seeing this issue? any changes?

Yep still an issue. Works fine locally and I don’t know how to debug it on the server

hey there,

i’m unable to load the deploy log you linked at the top of this thread, but looking at this deploy log:

I think that the issue might be that some of your dependencies are out of date.

see the explanation i gave here as to why it might make a difference to include your package lock in your deploy:

Another thing you might try, as the issue seems to be coming from the gatsby node package:

1:46:50 AM: success createSchemaCustomization - 0.005s
1:46:51 AM: error TypeError: Cannot set property 'id' of undefined
1:46:51 AM:     at resolvePlace (/opt/build/repo/node_modules/gatsby-source-google-places/gatsby-node.js:13:12)
1:46:51 AM:     at process._tickCallback (internal/process/next_tick.js:68:7)
1:46:51 AM: not finished source and transform nodes - 0.193s

is to ask in the gatsby community

to see if they have any answers for you.

You might also check your package.json to see if you are actually using the most recent versions?

Hi Perry, yes I believe it is using an out of date version of a dependency. I was actually the one who requested the update and tested it which is why I know the latest version works locally.

The deploy log didn’t load because I deleted that install and started again to see if it was a caching issue but the new one has the same error.

I have included my package.json and yarn.lock files in the repo where I have specified the latest version “0.0.5”. It appears that netlify is still getting version “0.0.4” of the dependency gatsby-source-google-places but I am not able to check this.

NPM also has 0.0.5 listed as the latest version.
gatsby-source-google-places - npm.

I have spoken with the author of the dependency and he isn’t sure either as it works fine for him locally.

here are links to the relevant files and dependencies.

package.json

yarn.lock
https://github.com/hartey11/posh-wash/blob/master/yarn.lock

issue raised on girhub

pull request updating the dependency

Hi, @hartey11, you might be able to see what version is being installed by dumping the package.json for that library to the deploy logs before running the build command.

In other words, one way to test might be to do change the build command from this:

gatsby build

To this:

cat ./node_modules/gatsby-source-google-places/package.json | grep version ; gatsby build

That should show the version of gatsby-source-google-places installed. It will log the version line in the file to the build logs. Would you be willing to please test that to double check to see what version is being installed?

Great thanks looks like it is using "version": "0.0.5".

So next question is what’s stopping it receiving the data via a promise?

Basically a request to "https://maps.googleapis.com/maps/api/place/details/json" is being made and its failing to extract the data from the response. The promise itself is catching errors but I can’t see what the actual response is.

Problem solved. The dependency developer was able to add more error handling messages and turns out there was an issue with my google cloud account. All sorted and able to deploy now. Thanks for helping.

1 Like

oh wow! how frustrating. I’m glad you figured it out :tada: