Magento – how to fix error after deploy:mode: developer

cliless-cssmagento2

In Magento2, after I created custom.less in myTheme, it does not render file less. so I tried run cli php bin/magento deploy:mode:set developer

then in the admin panel, I get the error:

SyntaxError: missing } after property list


};


require...nfig.js (line 381, col 1)
"NetworkError: 404 Not Found - http://localhost/mytheme/pub/static/adminhtml/Magento/backend/en_US/jquery/ui.js"
ui.js
"NetworkError: 404 Not Found - http://localhost/mytheme/pub/static/adminhtml/Magento/backend/en_US/jquery/jquery-storageapi.js"
jquery-...eapi.js
Error: Script error for: jquery/ui
http://requirejs.org/docs/errors.html#scripterror


var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);


require.js (line 166, col 17)
Error: Script error for: jquery/jquery-storageapi
http://requirejs.org/docs/errors.html#scripterror


var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);


require.js (line 166, col 17)
"NetworkError: 404 Not Found - http://localhost/mytheme/pub/static/adminhtml/Magento/backend/en_US/prototype.js"
prototype.js
Error: Script error for: prototype
http://requirejs.org/docs/errors.html#scripterror


var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);


require.js (line 166, col 17)
"NetworkError: 404 Not Found - http://localhost/mytheme/pub/static/adminhtml/Magento/backend/en_US/text.js"
text.js
Error: Script error for: text
http://requirejs.org/docs/errors.html#scripterror


var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);


require.js (line 166, col 17)
Error: Load timeout for modules: text!ui/template/modal/modal-popup.html_unnormalized2,text!ui/template/modal/modal-slide.html_unnormalized3,text!ui/template/modal/modal-custom.html_unnormalized4
http://requirejs.org/docs/errors.html#timeout


var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);

I tried removing everything in pub/static except .htaccess and run cli /bin/magento setup:static-content:deploy. but there is no change. Any suggestion? Please help me?

thanks

Best Answer

I was facing this issue after deploy. My Magento 2 install was not loading jquery-storageapi.js

I figured out magento2 loads the the core resources from the following folder lib/web/jquery/ and materializes in pub/static/....

I found that this folder was missing the jquery-storageapi.js

So the solution I Applied

  1. Download the jquery storage api https://plugins.jquery.com/storageapi/
  2. Copy it to lib/web/jquery/
  3. Clear the cache

And it worked

Related Topic