DWQA QuestionsCategory: Development ToolHow to use the market module
Showonne asked 8 months ago

I want to add mark dowm editor to my blog, just like SF. It seems that the marked module can. Then I went to GitHub to have a look. There was a problem in the process.
The demo given by GitHub is introduced in this way
But I can’t access it when I introduce it. I return 404, and then I copied a copy of the marked module folder to the static file directory, as follows
Can quote successfully, but there are errors againHow to use the market module
Is there a lack of dependency modules? Is there any way for node to directly access the modules in node modules?

n͛i͛g͛h͛t͛i͛r͛e͛ replied 8 months ago

Node can access the modules in node_modules. This is NPM’s job. You worry about not operating in the right place.Now the key is to find out where the error is undefined and analyze the reason. Let’s break the point.

1 Answers
Best Answer
Zhang Xiaozhu wants to fly answered 8 months ago
  1. You should be able to find the module after it is installedmarked.js, and then reference it accordingly.
  2. If not, you can try to directly require the JS file in the node and use it to see if there is any error.
  3. If the error is still reported, but you do not want to debug, you can use the browser rify to encapsulate the node module and use it directly for the browser.