Failed to open stream: No such file or directory in _locale_parse_js_file() (line 1097 of core/modules/locale/locale.module)

Created on 12 March 2024, 9 months ago
Updated 18 March 2024, 9 months ago

Problem/Motivation

Hi,

I installed the module and setup a field on a custom block to use CountUp which is rendered using layout builder. I'm getting this error when viewing the block.

Warning: file_get_contents(libraries/countup.js/dist/countUp.umd.js): Failed to open stream: No such file or directory in _locale_parse_js_file() (line 1097 of core/modules/locale/locale.module).

_locale_parse_js_file('libraries/countup.js/dist/countUp.umd.js') (Line: 530)
locale_js_translate(Array, Object) (Line: 486)
locale_js_alter(Array, Object, Object) (Line: 545)
Drupal\Core\Extension\ModuleHandler->alter('js', Array, Object, Object) (Line: 285)
Drupal\Core\Asset\AssetResolver->getJsAssets(Object, 1, Object) (Line: 328)
Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAssetLibraries(Object, Array) (Line: 165)
Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAttachments(Object) (Line: 97)
Drupal\big_pipe\Render\BigPipeResponseAttachmentsProcessor->processAttachments(Object) (Line: 45)
Drupal\Core\EventSubscriber\HtmlResponseSubscriber->onRespond(Object, 'kernel.response', Object)
call_user_func(Array, Object, 'kernel.response', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.response') (Line: 214)
Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object, Object, 1) (Line: 202)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

🇹🇭Thailand AlfTheCat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @AlfTheCat
  • 🇩🇪Germany guido_s Cologne

    Did you install the library correctly?
    If you are using composer merge plugin, you find instructions for this in the project description.
    You could also download and add it manually to the libraries folder of your project.
    We tested it with Version 2.4.2 but newer versions might also work.
    countUp.js Releases
    Make sure the file shown in the error message exists in your libraries folder.

    We will update the project description with better instructions about the implementation of this library.
    And we might implement some checks in code providing a better error handling for this case.

  • Status changed to Postponed: needs info 9 months ago
  • 🇩🇪Germany guido_s Cologne
  • 🇩🇪Germany guido_s Cologne

    I updated the project description with better installation instructions.

  • Status changed to Closed: works as designed 9 months ago
  • 🇩🇪Germany guido_s Cologne
Production build 0.71.5 2024