gpt4 book ai didi

ember-cli - 无法克隆 Git 存储库 - "Object function ... has no method ' hasMagic'"

转载 作者:行者123 更新时间:2023-12-04 09:35:07 25 4
gpt4 key购买 nike

我正在尝试克隆一个 Git 存储库,其中包含一个 Ember-CLI 项目 ( https://github.com/tgfischer/StockMarketApp )。当我这样做时,我收到以下错误:

tom@tom-fischer:~/Desktop/StockMarketApp$ ember server
version: 0.2.0-beta.1
Could not find watchman, falling back to NodeWatcher for file system events
Livereload server on port 35729
Serving on http://0.0.0.0:4200/
Object function glob(pattern, options, cb) {
if (typeof options === "function") cb = options, options = {}
if (!options) options = {}

if (typeof options === "number") {
deprecated()
return
}

var g = new Glob(pattern, options, cb)
return g.sync ? g.found : g
} has no method 'hasMagic'
TypeError: Object function glob(pattern, options, cb) {
if (typeof options === "function") cb = options, options = {}
if (!options) options = {}

if (typeof options === "number") {
deprecated()
return
}

var g = new Glob(pattern, options, cb)
return g.sync ? g.found : g
} has no method 'hasMagic'

at rimraf (/home/tom/Desktop/StockMarketApp/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rimraf/rimraf.js:57:13)
at lib$rsvp$node$$tryApply (/home/tom/Desktop/StockMarketApp/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1467:11)
at lib$rsvp$node$$handleValueInput (/home/tom/Desktop/StockMarketApp/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1567:20)
at fn (/home/tom/Desktop/StockMarketApp/node_modules/ember-cli/node_modules/broccoli-caching-writer/node_modules/rsvp/dist/rsvp.js:1555:18)
at /home/tom/Desktop/StockMarketApp/node_modules/ember-cli/node_modules/broccoli-caching-writer/index.js:100:14
at lib$rsvp$$internal$$tryCatch (/home/tom/Desktop/StockMarketApp/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:489:16)
at lib$rsvp$$internal$$invokeCallback (/home/tom/Desktop/StockMarketApp/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:501:17)
at lib$rsvp$$internal$$publish (/home/tom/Desktop/StockMarketApp/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:472:11)
at Object.lib$rsvp$asap$$flush [as _onImmediate] (/home/tom/Desktop/StockMarketApp/node_modules/ember-cli/node_modules/promise-map-series/node_modules/rsvp/dist/rsvp.js:1290:9)
at processImmediate [as _immediateCallback] (timers.js:330:15)

以下是我正在执行的步骤:
git clone https://github.com/tgfischer/StockMarketApp
cd StockMarketApp
bower install
npm install
ember server
ember server运行项目,并产生上面的错误。

当我运行本地计算机上的项目版本(正在推送到此存储库的项目)时,它可以正常工作。我试过卸载/重新安装 Bower、Ember-CLI、PhantomJS。我也试过在我的 Windows 分区上克隆这个项目但没有成功。

有谁知道可能会出什么问题?谢谢您的帮助。

最佳答案

看起来像 glob@4.5.1问题我刚刚修复了它,更改了 package.json使用对我有用的版本

而不是 "glob": "^4.0.5"使用 "glob": "4.4.0"
然后重新安装你的软件包

npm cache clean
rm -rf node_modules
npm install

( ember-cli@0.2.0 使用默认的 glob 版本对我有用,您使用的是 0.2.0-beta.1 也许如果您更新 ember-cli 它将起作用)

关于ember-cli - 无法克隆 Git 存储库 - "Object function ... has no method ' hasMagic'",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28969744/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com