Home > Software design >  Uncaught TypeError: Cannot read properties of undefined (reading 'start')
Uncaught TypeError: Cannot read properties of undefined (reading 'start')

Time:10-07

Started getting this error today on my Django project that uses Stimulus js. This started happening due to the recent Stimulus js 3.0.1 release.

Adding an answer with the solution that worked.

CodePudding user response:

Faced same issue after stimulus release 3.0.1. we had the Stimulus js file included using the path https://unpkg.com/stimulus/dist/stimulus.umd.js. After version 3.0.1 release, stimulus stopped working saying Uncaught TypeError: Cannot read properties of undefined (reading 'start') in chrome and Uncaught TypeError: Stimulus.Application is undefined in Firefox, but both pointing to same code.

Opening that path redirected to https://unpkg.com/[email protected]/dist/stimulus.umd.js that had only 10 to 15 lines of code, probably some mistake in unpkg.

Specifying older stimulus version in the path( and hence using version 3.0.0 of stimulus ), the error disappeared. Here is the url with previous version: https://unpkg.com/[email protected]/dist/stimulus.umd.js.

  • Related