Developer's guide to Markdown extensions에서 이어서 논의합니다:
제 확장 코드는 다음과 같습니다:
import { iconHTML } from 'discourse-common/lib/icon-library'
export function setup(helper) {
...
}
bundle exec rake db:create db:migrate를 실행하면 다음과 같은 오류가 발생합니다:
== Seed from /home/jack/discourse/db/fixtures/500_categories.rb
rake aborted!
MiniRacer::RuntimeError: Error: Could not find module `discourse-common/lib/icon-library` imported from `lib/discourse-markdown/my_bbcode_plugin`
플러그인을 실행할 때 컴포저에서는 모든 것이 정상적으로 작동합니다: 제 새로운 bbcode를 예상대로 사용할 수 있습니다. 하지만 게시물을 저장하면 다음과 같은 오류가 발생합니다:
MiniRacer::RuntimeError at /posts/30
====================================
> Error: Could not find module `discourse-common/lib/icon-library` imported from `discourse-markdown/discpage`
사실 제가 볼 때, pretty-text 폴더에 있는 파일들을 제외한 모든 Discourse 파일을 가져오려 할 때 문제가 발생하는 것 같습니다.
이것이 의도된 동작인가요?
저는 Windows WSL을 사용 중이며, @vinothkannans의 약간 유사한 문제를 발견했습니다.