0
我很抱歉这个简短的问题。我不知道如何部署angular2应用程序,所以我不知道该写些什么来帮助我。我需要部署生产。当我运行此命令npm build -prod
,它的确定,复制所有的JS和HTML DIST文件夹,但是当我在浏览器中打开index.html的应用程序不启动,并在日志中是这样的:生产构建 - 不打开应用程序
/E:/styles.a530fc809103522200ce.bundle.css Failed to load resource: net::ERR_FILE_NOT_FOUND
inline.64b91d2d61fb76e9d35a.bundle.js Failed to load resource: net::ERR_FILE_NOT_FOUND
polyfills.fe38fa94cd758b43a148.bundle.js Failed to load resource: net::ERR_FILE_NOT_FOUND
scripts.42e3c7ff6b40c17280bd.bundle.js Failed to load resource: net::ERR_FILE_NOT_FOUND
vendor.7b7007a424e50f334b56.bundle.js Failed to load resource: net::ERR_FILE_NOT_FOUND
main.5f1b617b49bf3e0d0eaa.bundle.js Failed to load resource: net::ERR_FILE_NOT_FOUND
jquery-3.2.1.slim.min.js:2 jQuery.Deferred exception: $(...).select2 is not a function TypeError: $(...).select2 is not a function
at HTMLDocument.<anonymous> (file:///E:/User/antos/Dokumenty/Projects/PCL%20VA/ProLight/ProLight.Client/dist/index.html:26:21)
at j (https://code.jquery.com/jquery-3.2.1.slim.min.js:2:30203)
at k (https://code.jquery.com/jquery-3.2.1.slim.min.js:2:30517) undefined
r.Deferred.exceptionHook @ jquery-3.2.1.slim.min.js:2
/E:/favicon.ico Failed to load resource: net::ERR_FILE_NOT_FOUND
jquery-3.2.1.slim.min.js:2 Uncaught TypeError: $(...).select2 is not a function
at HTMLDocument.<anonymous> (index.html:26)
at j (jquery-3.2.1.slim.min.js:2)
at k (jquery-3.2.1.slim.min.js:2)
我不不知道哪里可以成为问题,我不知道我必须告诉你哪些文件。请告诉我你想看哪些文件。
在'一的WebPack-DEV-服务器运行dev'模式,做ü有一个服务器的NodeJS服务于' dist'文件?你在浏览器中访问的网址是什么? – Dhyey
您需要在服务器上托管应用程序。 – Ploppy
这是下一个问题。我没有nodejs服务器,我使用IIS。我试图在浏览器中只打开index.html,我认为这是工作。 – bluray