Rails new 命令一直转圈怎么办?

2020-11-09 18:47:01 +08:00
 coool

大佬们,执行rails new demo命令时到下面这里一直在转圈,很久也不往下走,求指点:

warning @rails/webpacker > webpack > watchpack > watchpack-chokidar2 > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning @rails/webpacker > webpack > watchpack > watchpack-chokidar2 > chokidar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning @rails/webpacker > webpack > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning @rails/webpacker > webpack > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
[-/3] ⠂ waiting...
[-/3] ⠂ waiting...
[3/3] ⠂ node-sass

就是最后三行,一直在转圈:

[-/3] ⠂ waiting...
[-/3] ⠂ waiting...
[3/3] ⠂ node-sass

已经用下面这两个命令换了代理:

gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/

bundle config mirror.https://rubygems.org https://gems.ruby-china.com
4754 次点击
所在节点    Ruby on Rails
22 条回复
coool
2020-11-30 14:35:02 +08:00
@iloveayu 多谢,这个已经试了很多次了,刚才又试了一次仍然不行。目前用阿里云+vscode remote-ssh 还可以。

```
gyp ERR! command "/usr/local/Cellar/node/15.1.0/bin/node" "/Users/ll/ruby/work/demo/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/liuchang/ruby/work/demo/node_modules/node-sass
gyp ERR! node -v v15.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
```

针对这个报错网上也是一大堆没用的解决方案,开了全局代理也不行。我已经放弃了。
aristolochic
2020-12-24 16:19:55 +08:00
@coool (啊居然一个半月之后才看到……我没用 cnpm,据说有巨多坑而且不会影响到 yarn 。我是改在.npmrc 里的,yarn 应该会尊重这个的

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/723318

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX