0
我創建了一個新的Rails應用程序使用此命令Rails的角的WebPack工頭
rails new anrails --webpack=angular -d postgresql -T
和除一些警告和錯誤喜歡這些
warning [email protected]: The platform "linux" is incompatible with this module.
warning "[email protected]" has incorrect peer dependency "[email protected]".
An unexpected error occurred: "EPROTO: protocol error, symlink '../acorn/bin/acorn' -> '/vagrant/Sites/anrails/node_modules/acorn-dynamic-import/node_modules/.bin/acorn'".
warning "[email protected]" has unmet peer dependency "[email protected]^1.0.0 || ^2.0.0 || ^3.0.0".
warning "[email protected]" has unmet peer dependency "[email protected]^2.2.0 || ^3.0.0".
error An unexpected error occurred: "EPROTO: protocol error, symlink '../../../multicast-dns/cli.js' -> '/vagrant/Sites/anrails/node_modules/bonjour/node_modules/.bin/multicast-dns'".
我得到的消息:成功安裝Webpacker。
然後安裝角度和依賴關係,並得到這個錯誤
error An unexpected error occurred: "EPROTO: protocol error, symlink '../../../json5/lib/cli.js' -> '/vagrant/Sites/anrails/node_modules/loader-utils/node_modules/.bin/json5'".
在此之後
我得到的消息:Webpacker現在支持的角度和打字稿。
所以我在app
web: bundle exec rails s -b 0.0.0.0
webpacker: bin/webpack-dev-server
的根文件夾中創建Procfile和運行工頭開始,得到以下
09:40:39 web.1 | started with pid 4514
09:40:39 webpacker.1 | started with pid 4515
09:40:40 webpacker.1 | yarn run v0.27.5
09:40:40 webpacker.1 | error Command "webpack-dev-server" not found.
09:40:40 webpacker.1 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
09:40:40 webpacker.1 | exited with code 1
09:40:40 system | sending SIGTERM to all processes
09:40:41 web.1 | terminated by SIGTERM
運行在流浪者在Windows上,紅寶石2.4.1p111來說,Rails 5.1 .2,節點6.11.1,yarn 0.27.5