【发布时间】:2018-05-18 11:17:52
【问题描述】:
我正在尝试从 this repo 构建一个 npm 包,我有一个“缩小”的 js 文件,IntelliJ 在看到 <script src=""> 标记时会下载该文件,该文件名为 http_www.webglearth.com_v2_api.js
所以,我已按照 npm official 和 treehouse 的说明进行操作,但每次我尝试在项目上执行 npm install 时都会收到 npm ERR! not a package 错误消息,我已将我的 attempt 上传到我的 Git-hub 帐户,这是 package.json 的样子:
{
"name": "(web_gl_earth_module)",
"version": "1.0.0",
"description": "An npm package to help integrate WEBGL Earth to Angular apps",
"main": "http_www.webglearth.com_v2_api.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "(https://github.com/webglearth/webglearth2.git)"
},
"keywords": [
"webglearth",
"globe",
"visualisation"
],
"author": " (git_hub accounts: petrsloup, klokan)",
"license": "(Apache-2.0)"
}
我浏览过类似的错误,但没有一个案例场景真正符合我的问题,我不确定我是否以正确的方式尝试,或者它是否可行。
我的最终目标是能够将此存储库导入 Angular 项目,这现在完全不可能
【问题讨论】:
-
说到 JavaScript,我真的是个菜鸟,所以这个问题可能很幼稚、愚蠢并且充满了基本错误,如果它很糟糕,请原谅,但我已经三天了对此并开始感到非常沮丧
标签: javascript node.js angular npm webgl-earth