Front End Development Libraries Projects - Build a Markdown Previewer

It seems like codepen is having trouble building the marked library, and it’s giving these message:

"[Package Error] ‘marked@v5.0.1’ could not be built. **
[1/5] Verifying package is valid…
[2/5] Installing dependencies from npm…
[3/5] Building package using esinstall…
Running esinstall…
Failed to load node_modules/marked/bin/marked.js
** Unexpected token (1:0) in marked/bin/marked.js

Install failed.
Install failed."

How can I fix this Error?

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36

Challenge: Front End Development Libraries Projects - Build a Markdown Previewer

Link to the challenge:

Probably an issue with the import URL. Use the " Add External Scripts/Pens" in the Setting and add the script there, then make sure you use the parse method marked.parse()


Personally, I would use StackBlitz or CodeSandbox for this instead.

I used this parser when i completed the project and it worked well. Initially i used the parser that codepen had and it was an older version and caused all the tests to fail.


 <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>

Thanks guys I already solved the issue , I have changed my react project to a vanilla javascript project and used this cdn instead:

https://cdn.jsdelivr.net/npm/marked@5.0.1/lib/marked.umd.min.js

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.