我正在使用Instagram API的Meteor应用程序。我添加了node-instagram模块,这似乎是最新的,但是当我添加import Instagram from 'node-instagram'
时,我得到了崩溃启动应用程序。知道我应该根据这个输出查找原因吗?
提前感谢您的任何帮助!
C:\Users\Harry\AppData\Local\.meteor\packages\templating-compiler\1.2.15\plugin.compileTemplatesBatch.os\npm\node_modules\meteor\promise\node_modules\meteor-promise\promise_server.js:177
throw error;
^
TypeError: Cannot set property '/C/Users/Harry/WebstormProjects/ig-dash/node_modules/http/package.json' of undefined
at Resolver._resolvePkgJsonMain (C:\tools\isobuild\resolver.js:320:9)
at Resolver._resolve (C:\tools\isobuild\resolver.js:123:25)
at C:\tools\isobuild\resolver.js:75:19
at Entry._reallyRecompute (C:\Users\Harry\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\optimism\lib\entry.js:215:26)
at Entry._recomputeIfDirty (C:\Users\Harry\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\optimism\lib\entry.js:179:17)
at Entry.recompute (C:\Users\Harry\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\optimism\lib\entry.js:46:20)
at Resolver.optimistic [as resolve] (C:\Users\Harry\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\optimism\lib\index.js:50:18)
at ImportScanner._resolve (C:\tools\isobuild\import-scanner.js:466:36)
at C:\tools\isobuild\import-scanner.js:499:29
at _.each._.forEach (C:\Users\Harry\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\underscore\underscore.js:87:22)
at ImportScanner._scanFile (C:\tools\isobuild\import-scanner.js:498:5)
at C:\tools\isobuild\import-scanner.js:577:12
at _.each._.forEach (C:\Users\Harry\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\underscore\underscore.js:87:22)
at ImportScanner._scanFile (C:\tools\isobuild\import-scanner.js:498:5)
at C:\tools\isobuild\import-scanner.js:577:12
at _.each._.forEach (C:\Users\Harry\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\underscore\underscore.js:87:22)
at ImportScanner._scanFile (C:\tools\isobuild\import-scanner.js:498:5)
at C:\tools\isobuild\import-scanner.js:577:12
at _.each._.forEach (C:\Users\Harry\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\underscore\underscore.js:87:22)
at ImportScanner._scanFile (C:\tools\isobuild\import-scanner.js:498:5)
at C:\tools\isobuild\import-scanner.js:577:12
at _.each._.forEach (C:\Users\Harry\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\underscore\underscore.js:87:22)
at ImportScanner._scanFile (C:\tools\isobuild\import-scanner.js:498:5)
at C:\tools\isobuild\import-scanner.js:530:18
at _.each._.forEach (C:\Users\Harry\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\underscore\underscore.js:87:22)
at ImportScanner._scanFile (C:\tools\isobuild\import-scanner.js:498:5)
at C:\tools\isobuild\import-scanner.js:344:14
at Array.forEach (native)
at ImportScanner.scanImports (C:\tools\isobuild\import-scanner.js:342:22)
at C:\tools\isobuild\compiler-plugin.js:1040:17
at Array.forEach (native)
at Function.computeJsOutputFilesMap (C:\tools\isobuild\compiler-plugin.js:1008:19)
at ClientTarget._emitResources (C:\tools\isobuild\bundler.js:1020:8)
at C:\tools\isobuild\bundler.js:791:12
at C:\tools\utils\buildmessage.js:359:18
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:352:34
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:350:23
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at Object.enterJob (C:\tools\utils\buildmessage.js:324:26)
at ClientTarget.make (C:\tools\isobuild\bundler.js:782:18)
at C:\tools\isobuild\bundler.js:2652:14
at C:\tools\isobuild\bundler.js:2741:20
at Array.forEach (native)
at Function._.each._.forEach (C:\Users\Harry\AppData\Local\.meteor\packages\meteor-tool\1.4.2_3\mt-os.windows.x86_32\dev_bundle\lib\node_modules\underscore\underscore.js:79:11)
at C:\tools\isobuild\bundler.js:2740:7
at C:\tools\utils\buildmessage.js:271:13
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:264:29
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:262:18
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at C:\tools\utils\buildmessage.js:253:23
at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
at Object.capture (C:\tools\utils\buildmessage.js:252:19)
at bundle (C:\tools\isobuild\bundler.js:2633:31)
at C:\tools\isobuild\bundler.js:2580:32
at Object.withCache (C:\tools\fs\files.js:1601:12)
at Object.exports.bundle (C:\tools\isobuild\bundler.js:2580:16)
at C:\tools\runners\run-app.js:574:36
at Function.run (C:\tools\tool-env\profile.js:490:12)
at bundleApp (C:\tools\runners\run-app.js:573:34)
at AppRunner._runOnce (C:\tools\runners\run-app.js:617:35)
at AppRunner._fiber (C:\tools\runners\run-app.js:876:28)
at C:\tools\runners\run-app.js:403:12
答案 0 :(得分:2)
根据我自己的调查,这似乎是一个问题,npm包有一个package.json
文件,但无法导入。例如,这是the fake fs
package on npmjs的情况。
就我个人而言,做
meteor npm uninstall --save fs
解决了这个问题。
答案 1 :(得分:0)
我遇到了node-instagram
和instagram-node
这个问题,似乎是我安装的npm软件包的问题。摆弄一下后我就开始工作了。在它有用的情况下,这是我的 package.json 的差异:
index 78ebc2e..ca65629 100644
--- a/package.json
+++ b/package.json
@@ -7,9 +7,8 @@
"dependencies": {
"angular": "^1.6.1",
"angular-meteor": "^1.3.11",
- "babel-runtime": "6.18.0",
- "http": "0.0.0",
- "instagram-api": "^1.0.3",
- "meteor-node-stubs": "~0.2.0"
+ "babel-runtime": "^6.20.0",
+ "instagram-node": "^0.5.8",
+ "meteor-node-stubs": "^0.2.4"
}
}