0
0

More than 3 years have passed since last update.

🍰【CakePHP2】js.mapファイルが存在しないエラーの解消法

Last updated at Posted at 2020-04-09

環境

PHP 7.2.21
CakePHP 2.10.18

やりたいこと

pnotifyを追加したところ、下記の様なJsControllerが無いエラーが多数吐かれていたが動作に問題はなかった
が、このまま放置は良くないので出ないように修正したい

error.log
2020-03-04 10:10:58 Error: [MissingControllerException] Controller class JsController could not be found.
Exception Attributes: array (
  'class' => 'JsController',
  'plugin' => NULL,
)
Request URL: /js/vendor/jquery-pnotify/pnotify.js.map
Stack Trace:
#0 /***/***/***/webroot/index.php(100): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#1 {main}

やったこと

pnotify.custom.min.js
/*
PNotify 3.2.0 sciactive.com/pnotify/
(C) 2015 Hunter Perrin; Google, Inc.
license Apache-2.0
*/
!function(t,i) *******省略******* {"feturn s(i)});
//# sourceMappingURL=pnotify.js.map ←これを削除もしくはmapファイルを追加で対応可能

ここからmapファイルをダウンロードし同階層に格納
https://cdnjs.com/libraries/pnotify

もしくは最下部にあるmapファイルのリンクを削除

pnotify.custom.min.js
//# sourceMappingURL=pnotify.js.map
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0