























这是一个创建于 2042 天前的主题,其中的信息可能已经有所发展或是发生改变。
大佬们,执行rails new demo命令时到下面这里一直在转圈,很久也不往下走,求指点:
warning @rails/webpacker > webpack > watchpack > watchpack-chokidar2 > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning @rails/webpacker > webpack > watchpack > watchpack-chokidar2 > chokidar > [email protected]: 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 > [email protected]: https://github.com/lydell/resolve-url#deprecated
warning @rails/webpacker > webpack > micromatch > snapdragon > source-map-resolve > [email protected]: 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
1 qiuyi116 2020 年 11 月 9 日 via Android我记得是有 node 依赖。npm 也加一次镜像。 |
3 coool 2020 年 11 月 9 日弄一天了都没弄好,可能是 rails 门槛太高,高攀不起…… |
4 aristolochic 2020 年 11 月 9 日node-sass 是有二进制依赖( node-gyp )的,淘宝有预编译的二进制包,但是要想直接使用可不是设置 npm 的镜像源就完事儿了的,具体看 taobao npm 的文档。上面的 warning 忽略就行,都那样。 |
5 fangxing204 2020 年 11 月 9 日 via Android应该是卡在 yarn install 了,试试设置代理,删掉 node_modules 重试? |
10 impl 2020 年 11 月 10 日 via AndroidCtrl C 试试? |
11 coool 2020 年 11 月 10 日@doublechenpaul 大佬,啥设置?我这从九点半上班转到现在了。 @impl Ctrl C => rm -rf demo => rails new demo, 很多次了 |
12 coool 2020 年 11 月 10 日哇,删除了所有的代理,本地 global 翻墙,终于成功了…… |
13 msg7086 2020 年 11 月 10 日你如果只是要 new 一个新的 Rails 项目的话,如果用不到 webpack 那可以跳过 webpack 那块。 |
14 coool 2020 年 11 月 10 日@msg7086 唉,现在又碰到新问题了,我执行`bin/rails generate controller Say hello goodbye`之后访问`localhost:3000/say/hello`一直报: ``` error Command "webpack" not found. 执行啥都没用,` bundle exec rails webpacker:install`也不行…… 愁人 |
15 msg7086 2020 年 11 月 10 日我不用 webpack 的,帮不了你…… |
18 wangkun025 2020 年 11 月 11 日gem install rails -v 5.2.4.4 visit http://localhost:3000/posts 上面的我测试了,没问题。 |
20 iloveayu 2020 年 11 月 30 日@coool #14 |
21 coool 2020 年 11 月 30 日@iloveayu 多谢,这个已经试了很多次了,刚才又试了一次仍然不行。目前用阿里云+vscode remote-ssh 还可以。 ``` 针对这个报错网上也是一大堆没用的解决方案,开了全局代理也不行。我已经放弃了。 |
22 aristolochic 2020 年 12 月 24 日@coool (啊居然一个半月之后才看到……我没用 cnpm,据说有巨多坑而且不会影响到 yarn 。我是改在.npmrc 里的,yarn 应该会尊重这个的 |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。