# Can I offline runthe example html?

**URL:** <https://discourse.threejs.org/t/can-i-offline-runthe-example-html/53018>\
**Category:** Questions\
**Tags:** loaders, animation\
**Created:** [June 19, 2023, 1:39pm UTC](https://discourse.threejs.org/t/can-i-offline-runthe-example-html/53018 "2023-06-19T13:39:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rikcuo.akira](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/rikcuo.akira/32/37369_2.png) [@rikcuo.akira](https://discourse.threejs.org/u/rikcuo.akira)\
**Post date:** [June 19, 2023, 1:39pm UTC](https://discourse.threejs.org/t/can-i-offline-runthe-example-html/53018/1 "2023-06-19T13:39:12Z")

</div>

I can run all examples of the html in doc folder by using vscode. But I wish offline to directly run the /examples/webgl\_loader\_mmd.html, but the chrome console appears some error as below:  
Can I solve this problem？

webgl\_loader\_mmd.html:1 Access to script at ‘file:///C:/WorkSpace/three.js-dev/build/three.module.js’ from origin ‘null’ has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted.  
webgl\_loader\_mmd.html:45  
GET file:///C:/WorkSpace/three.js-dev/build/three.module.js net::ERR\_FAILED  
webgl\_loader\_mmd.html:1 Access to script at ‘file:///C:/WorkSpace/three.js-dev/examples/jsm/libs/stats.module.js’ from origin ‘null’ has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted.  
webgl\_loader\_mmd.html:47  
GET file:///C:/WorkSpace/three.js-dev/examples/jsm/libs/stats.module.js net::ERR\_FAILED  
webgl\_loader\_mmd.html:1 Access to script at ‘file:///C:/WorkSpace/three.js-dev/examples/jsm/libs/lil-gui.module.min.js’ from origin ‘null’ has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted.  
webgl\_loader\_mmd.html:48  
GET file:///C:/WorkSpace/three.js-dev/examples/jsm/libs/lil-gui.module.min.js net::ERR\_FAILED  
webgl\_loader\_mmd.html:1 Access to script at ‘file:///C:/WorkSpace/three.js-dev/examples/jsm/controls/OrbitControls.js’ from origin ‘null’ has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted.  
webgl\_loader\_mmd.html:50  
GET file:///C:/WorkSpace/three.js-dev/examples/jsm/controls/OrbitControls.js net::ERR\_FAILED  
webgl\_loader\_mmd.html:1 Access to script at ‘file:///C:/WorkSpace/three.js-dev/examples/jsm/effects/OutlineEffect.js’ from origin ‘null’ has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted.  
webgl\_loader\_mmd.html:51  
GET file:///C:/WorkSpace/three.js-dev/examples/jsm/effects/OutlineEffect.js net::ERR\_FAILED  
webgl\_loader\_mmd.html:1 Access to script at ‘file:///C:/WorkSpace/three.js-dev/examples/jsm/loaders/MMDLoader.js’ from origin ‘null’ has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted.  
webgl\_loader\_mmd.html:52  
GET file:///C:/WorkSpace/three.js-dev/examples/jsm/loaders/MMDLoader.js net::ERR\_FAILED  
webgl\_loader\_mmd.html:1 Access to script at ‘file:///C:/WorkSpace/three.js-dev/examples/jsm/animation/MMDAnimationHelper.js’ from origin ‘null’ has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted.  
webgl\_loader\_mmd.html:53

---

<div class="post-metadata">

**Author:** ![drcmda](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@drcmda](https://discourse.threejs.org/u/drcmda)\
**Post date:** [June 19, 2023, 1:47pm UTC](https://discourse.threejs.org/t/can-i-offline-runthe-example-html/53018/2 "2023-06-19T13:47:33Z")

</div>

even if you could run bare html, it can’t fetch local assets (models, environments etc) because browser policies forbid it. i guess you could switch that off somehow. but most likely you are expected to install a http server.

these examples are a little … odd, i don’t know why they’re not folders with a package.json inside so that each could be npm run dev’…ed to start. three has a history of making these things incredibly difficult. it’s a wonder that it can even be npm installed. and i guess now that you can, something else must be held back for a few years.

---

<div class="post-metadata">

**Author:** ![Lawrence3DPK](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/lawrence3dpk/32/29184_2.png) [@Lawrence3DPK](https://discourse.threejs.org/u/Lawrence3DPK)\
**Post date:** [June 19, 2023, 3:42pm UTC](https://discourse.threejs.org/t/can-i-offline-runthe-example-html/53018/3 "2023-06-19T15:42:03Z")

</div>

if you just want to run any example without having to go through vs code, you’re still going to need a server setup to allow cors header access in your browser, you can simply install [simplewebserver](https://simplewebserver.org/download.html) and open the three.js directory in this…
