本番環境で外部CSSのファイルをasset以下に置いた後に、プレコンパイルの為にrake assets:precompile RAILS_ENV=production
を実行したら、以下のようにエラーが発生しました。
rake assets:precompile RAILS_ENV=production Yarn executable was not detected in the system. Download Yarn at https://yarnpkg.com/en/docs/install rake aborted! ExecJS::ProgramError: TypeError: Object #<Object> has no method 'log2' unpackSupport ((execjs):14655:36) (execjs):14669:28 Array.reduce (native) (execjs):14667:70 Array.reduce (native) unpackFeature ((execjs):14665:44) f ((execjs):20:10) Object.caniuse-lite ((execjs):88:1) o ((execjs):1:913) (execjs):1:964 Tasks: TOP => assets:precompile (See full trace by running task with --trace)
これまで、このコマンドは成功していたのですが、エラー文を見る限りyarnをインストールする必要があるのかと思い、npm install yarn -g
を実行したところ、以下のようなエラーメッセージが現れました。
Error: UNABLE_TO_GET_ISSUER_CERT_LOCALLY npm ERR! at SecurePair.<anonymous> (tls.js:1430:32) npm ERR! at SecurePair.emit (events.js:92:17) npm ERR! at SecurePair.maybeInitFinished (tls.js:1029:10) npm ERR! at CleartextStream.read [as _read] (tls.js:521:13) npm ERR! at CleartextStream.Readable.read (_stream_readable.js:341:10) npm ERR! at EncryptedStream.write [as _write] (tls.js:418:25) npm ERR! at doWrite (_stream_writable.js:226:10) npm ERR! at writeOrBuffer (_stream_writable.js:216:5) npm ERR! at EncryptedStream.Writable.write (_stream_writable.js:183:11) npm ERR! at write (_stream_readable.js:602:24) npm ERR! If you need help, you may report this log at: npm ERR! <http://github.com/isaacs/npm/issues> npm ERR! or email it to: npm ERR! <npm-@googlegroups.com>
このような現象を解決する方法をご存知の方がいれば、ご教示いただけると嬉しいです。
あなたの回答
tips
プレビュー