I successfully solved this issue after I changed my app/javascript/common.js into app/javascript/common.js.erb just by adding
pin "common"
into config/importmap.rb
It seems the only issue was that pin_all_from "app/javascript" ignored the .js.erb extension.