Project reinstalling dependencies on wake up?

Have you specified a node version in your package.json?

Yeah, it’s:

"engines": {
    "node": "12"
  }

Which for Glitch, means Node 12.0.0

Could you try enable-npm then run enable-pnpm?

Tried that, and it’s still reinstalling on wake-up.

I’ve had this pnpm install issue on my projects. I think a temporary solution I found is to use Uptime Robot to ping the project url (your one is https://emoji-gender-reveal.glitch.me) every 5 minutes… from there I didn’t get the project reinstalling packages issue as much.

Thanks for your reports @noelleleigh and @3ch!

While it is common for projects to occasionally reinstall dependencies, it should not be happening all the time.

I’ll ask the team to take a look at this.

@3ch can you tell me the name of your project(s) where this is happening?

Also if y’all could let me know the frequency at which this is happening now, compared to what you usually experience, that would be a big help!

2 Likes

Thanks for that @3ch - I have asked our team to look into it.

I just tried sleeping and waking my project 3 times in a row and it reinstalled the dependencies every time.

It should run pnpm as it wakes up, but the dependencies should already be in place, so that should be pretty fast. Can we get a copy of the logs that you’re seeing when it wakes up?

…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/LPC_analysis_filter.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/LPC_inv_pred_gain.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/table_LSF_cos.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF2A.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_stabilize.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/NLSF_VQ_weights_laroia.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/pitch_est_tables.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/resampler.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_down2_3.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_down2.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_AR2.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_down_FIR.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_IIR_FIR.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_private_up2_HQ.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/resampler_rom.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/sigm_Q15.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/sort.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/sum_sqr_shift.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_decode_pred.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_encode_pred.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_find_predictor.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/stereo_quant_pred.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/apply_sine_window_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/corrMatrix_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/encode_frame_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_LPC_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_LTP_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_pitch_lags_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/find_pred_coefs_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/LPC_analysis_filter_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/LTP_analysis_filter_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/LTP_scale_ctrl_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/noise_shape_analysis_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/prefilter_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/process_gains_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/regularize_correlations_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/residual_energy_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/solve_LS_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/warped_autocorrelation_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/wrappers_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/autocorrelation_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/burg_modified_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/bwexpander_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/energy_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/inner_product_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/k2a_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/levinsondurbin_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/LPC_inv_pred_gain_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/pitch_analysis_core_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/scale_copy_vector_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/scale_vector_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/schur_FLP.o
…/0.3.2/node_modules/node-opus install: CC(target) Release/obj.target/libopus/deps/opus/silk/float/sort_FLP.o
…/0.3.2/node_modules/node-opus install: AR(target) Release/obj.target/deps/opus.a
…/0.3.2/node_modules/node-opus install: COPY Release/opus.a
…/0.3.2/node_modules/node-opus install: CXX(target) Release/obj.target/node-opus/src/node-opus.o
…/0.3.2/node_modules/node-opus install: SOLINK_MODULE(target) Release/obj.target/node-opus.node
…/0.3.2/node_modules/node-opus install: COPY Release/node-opus.node
…/0.3.2/node_modules/node-opus install: make: Leaving directory ‘/rbd/pnpm-volume/f277a04d-7ce9-4a2d-838a-665c1f2f361a/node_modules/.registry.npmjs.org/node-opus/0.3.2/node_modules/node-opus/build’
…/0.3.2/node_modules/node-opus install: gyp info ok
…/0.3.2/node_modules/node-opus install: Done
dependencies:

  • better-sqlite-pool 0.2.2
  • canvas 2.5.0
  • cowsay 1.4.0
  • dblapi.js 2.3.0
  • discord.js 11.5.1
  • enmap 4.8.7
  • express 4.17.1
  • gamedig 2.0.14
  • google-translate-api 2.3.0
  • moment 2.24.0
  • moment-duration-format 2.3.2
  • mongoose 5.6.8
  • ms 2.1.2
  • node-cmd 3.0.0
  • node-gyp 5.0.3
  • node-opus 0.3.2
  • node-superfetch 0.1.9
  • nodemon 1.19.1
  • os-utils 0.0.14
  • platform 1.3.5
  • pretty-ms 5.0.0
  • quick.db 7.0.0-b22
  • quick.hook 1.5.1
  • rebuild 0.1.2
  • simple-youtube-api 5.2.1
  • snekfetch 4.0.4
  • superagent 5.1.0
  • superfetch 1.1.1
  • twitter 1.7.1
  • weather-js 2.0.0
  • windows-cpu 1.1.0
  • ytdl-core 0.29.5
    Total install time: 280286ms

this it what i can see logged, though it differs per project because of different packages being installed

See my first post for an install log. I guess it actually reuses the deps, but it still takes quite a long time.

I am seeing this as well on my projects. Even projects that are hit by uptimerobot.com every 5min. I have been getting spammed by the “app is down” notifications I have configured on uptimerobot since approximately the morning (PST) of Wed Dec 11,

Example project: HMDWATest

We think this is fixed now. Let us know if you see it again.

2 Likes

Yeah! Mine is no longer installing every time! Thanks!

I’m getting this error since it decided to reinstall dependencies which it has never done before.

Hi @SwimmingWhale

Is this still happening within your project?

1 Like

About 18-20 hours of the day, yes.

Hii DapperManatee64!

I don’t think this is the same problem as the one that various people were experiencing earlier in the thread - for example, your logs do not show the project reinstalling over and over again - the error is that your project is looking for a .node file that it is not finding. Normally making any change, even whitespace, to package.json will cause a reinstall. I notice you have a watch.json with a throttle set to 900000. Would you try deleting or watch.json temporarily, then causing a reinstall, for example by making a whitespace change to package.json?

Johnicholas

1 Like

I have deleted watch.json and have created a whitespace in package.json

after this, it has returned the same error as before.

Can I ask what the solution was? Is there a way to write projects to discourage unnecessary reinstalls?