read package.json from the code : package.json.js 404 (Not Found)

纵然是瞬间 提交于 2019-12-12 05:58:35

问题


I have an angular application but when I try this code :

require("../../../package.json").version

I get this error message :Error loading http://localhost/package.json.js as "../../../package.json" from app.component.js

why am i getting : package.json.js file? with such bizzare extension?

Thanks,

来源:https://stackoverflow.com/questions/44084857/read-package-json-from-the-code-package-json-js-404-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!