2

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

1
  • is it solved ? i am also facing same issue ? Commented Aug 4, 2017 at 11:04

2 Answers 2

4

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

0

I feel that, if you already setup any cache in server it might be the reason. Try to disable the minification (if enables, only works in production mode) and clear the server caches. Do not forget to run php magento setup:static-content:deploy after deploy mode set.

I got jquery-storeageapi.js does not load 404 script error and required.js file in pub/static wrong path wrapped with secure folder on staging server.

You can follow below steps and it will be fix.

1) Set deploy mode to production - php magento deploy:mode:set production (js and css minification will works with production mode.If you are in developer mode with code minified above issues will show up as I experienced it. Also verify using echo the print_r($_SERVER) in index.php that production mode is set before load the website)

2) Clear all the caches setup in server /etc/init.d/nginx restart /etc/init.d/php5.6-fpm restart /etc/init.d/varnish restart

3) Clear the browser cache and view it in incognito mode. That's it!

Cheers!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.