我一直在使用Webpack,Vue.js和Rails开发一个应用程序.两个月没有问题,但是当我尝试启动rails console时无处不在rails c,yarn抱怨包已过时:
error An unexpected error occurred: "Unknown language key integrityNodeDoesntMatch".
info If you think this is a bug, please open a bug report with the information provided in "/Users/maksimfedotov/vras/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.
========================================
Your Yarn packages are out of date!
Please run `yarn install` to update.
========================================
Run Code Online (Sandbox Code Playgroud)
然而,当我跑yarn install:
yarn install v1.3.2
[1/4] Resolving packages...
success Already up-to-date.
? Done in 0.71s.
Run Code Online (Sandbox Code Playgroud)
我一直在查看yarn和webpacker文档,尝试了各种yarn清理命令,但没有运气.
有趣的是,我仍然可以运行服务器,它唯一抱怨的控制台.
我有两个表:Role和User
id
name
email
password
Roleid
Run Code Online (Sandbox Code Playgroud)
id
name
Run Code Online (Sandbox Code Playgroud)
我想要的是获取Role当前登录的名称User。就像是Auth::user()->role()->name;