Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

必须要用npm安装么 #9

Open
caflulu opened this issue Mar 11, 2020 · 6 comments
Open

必须要用npm安装么 #9

caflulu opened this issue Mar 11, 2020 · 6 comments

Comments

@caflulu
Copy link

caflulu commented Mar 11, 2020

工程一直没跑起来,看起来像是缺文件的样子,不过也学习了很多

@xtfge
Copy link
Owner

xtfge commented Mar 11, 2020

自己打包的也可以,直接放到node_modules文件夹下,注意要把dist和package.json全部复制进去,github被墙,我没法更新,上次更新了一半,可能有些问题,建议去码云下载,下面有码云的地址

@caflulu
Copy link
Author

caflulu commented Mar 11, 2020

好的,谢谢大佬

@llllieu
Copy link

llllieu commented May 14, 2020

我也出现上面的问题了,并且重新编译覆盖了,可是还是有问题:
vue-router.esm.js:2117 TypeError: Cannot read property 'defined' of undefined
at Object.cd53 (cesiumdrawViewer.umd.min.js:40)
at n (cesiumdrawViewer.umd.min.js:1)
at Object.4e00 (cesiumdrawViewer.umd.min.js:25)
at n (cesiumdrawViewer.umd.min.js:1)
at Object.e167 (cesiumdrawViewer.umd.min.js:40)
at n (cesiumdrawViewer.umd.min.js:1)
at Module.fb15 (cesiumdrawViewer.umd.min.js:40)
at n (cesiumdrawViewer.umd.min.js:1)
at push../node_modules/cesium-draw/dist/cesiumdrawViewer.umd.min.js.014b (cesiumdrawViewer.umd.min.js:1)
at cesiumdrawViewer.umd.min.js:1

是否是readme.md文件中的引用方式不对呀

@xtfge
Copy link
Owner

xtfge commented May 15, 2020

我也出现上面的问题了,并且重新编译覆盖了,可是还是有问题:
vue-router.esm.js:2117 TypeError: Cannot read property 'defined' of undefined
at Object.cd53 (cesiumdrawViewer.umd.min.js:40)
at n (cesiumdrawViewer.umd.min.js:1)
at Object.4e00 (cesiumdrawViewer.umd.min.js:25)
at n (cesiumdrawViewer.umd.min.js:1)
at Object.e167 (cesiumdrawViewer.umd.min.js:40)
at n (cesiumdrawViewer.umd.min.js:1)
at Module.fb15 (cesiumdrawViewer.umd.min.js:40)
at n (cesiumdrawViewer.umd.min.js:1)
at push../node_modules/cesium-draw/dist/cesiumdrawViewer.umd.min.js.014b (cesiumdrawViewer.umd.min.js:1)
at cesiumdrawViewer.umd.min.js:1

是否是readme.md文件中的引用方式不对呀

这个组件依赖于Cesium,因此你必须先引入Cesium,如果你是通过import引入的Cesium,必须将Cesium注册到window下,比如
import Cesium from 'cesium/Cesium;
window.Cesium=Cesium

@llllieu
Copy link

llllieu commented May 16, 2020

我也出现上面的问题了,并且重新编译覆盖了,可是还是有问题:
vue-router.esm.js:2117 TypeError: Cannot read property 'defined' of undefined
at Object.cd53 (cesiumdrawViewer.umd.min.js:40)
at n (cesiumdrawViewer.umd.min.js:1)
at Object.4e00 (cesiumdrawViewer.umd.min.js:25)
at n (cesiumdrawViewer.umd.min.js:1)
at Object.e167 (cesiumdrawViewer.umd.min.js:40)
at n (cesiumdrawViewer.umd.min.js:1)
at Module.fb15 (cesiumdrawViewer.umd.min.js:40)
at n (cesiumdrawViewer.umd.min.js:1)
at push../node_modules/cesium-draw/dist/cesiumdrawViewer.umd.min.js.014b (cesiumdrawViewer.umd.min.js:1)
at cesiumdrawViewer.umd.min.js:1
是否是readme.md文件中的引用方式不对呀

这个组件依赖于Cesium,因此你必须先引入Cesium,如果你是通过import引入的Cesium,必须将Cesium注册到window下,比如
import Cesium from 'cesium/Cesium;
window.Cesium=Cesium

我用的是:vue add cesium 命令直接加入的vue-cli-plugin-cesium 一切都是配置好的,也不知道怎么改

@mayi8986
Copy link

我也出现上面的问题了,并且重新编译覆盖了,可是还是有问题:
vue-router.esm.js:2117 TypeError: Cannot read property 'defined' of undefined
at Object.cd53 (cesiumdrawViewer.umd.min.js:40)
at n (cesiumdrawViewer.umd.min.js:1)
at Object.4e00 (cesiumdrawViewer.umd.min.js:25)
at n (cesiumdrawViewer.umd.min.js:1)
at Object.e167 (cesiumdrawViewer.umd.min.js:40)
at n (cesiumdrawViewer.umd.min.js:1)
at Module.fb15 (cesiumdrawViewer.umd.min.js:40)
at n (cesiumdrawViewer.umd.min.js:1)
at push../node_modules/cesium-draw/dist/cesiumdrawViewer.umd.min.js.014b (cesiumdrawViewer.umd.min.js:1)
at cesiumdrawViewer.umd.min.js:1
是否是readme.md文件中的引用方式不对呀

这个组件依赖于Cesium,因此你必须先引入Cesium,如果你是通过import引入的Cesium,必须将Cesium注册到window下,比如
import Cesium from 'cesium/Cesium;
window.Cesium=Cesium

我也出现这个错误呢?加了下面这两句还是不行呢?

import Cesium from 'cesium/Cesium;
window.Cesium=Cesium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants