Skip to content

Conversation

@100ideas
Copy link

@100ideas 100ideas commented Apr 19, 2019

problem: mdx-live-editor requires forks of npm packages that are not published on npm or yarn registries. Perhaps you have them yarn linked on your dev box?

# master was at f3da3ff
$ git clone mdx-live-editor
$ cd mdx-live-editor
$ yarn
yarn install v1.15.2
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@axe312/babel-plugin-inline-import/-/babel-plugin-inline-import-4.0.0.tgz: Request failed \"404 Not Found\"".
# same thing happens w/ '@axe312/easymde'

The two commits show alternative approaches to fixing the error:

  • use forked package github url in package.json: this fetches the up-to-date fork source code from your repos
  • use yarn alias to to rename original packages to name of forked packages: this fetches the original packages from npm/yarn registry, but allows the mdx-live-editor source code to refer to them in imports as if they were the forked version. Not good approach if you plan on modifying your forks.

either way, both solutions allow git cloneing then yarn installing to work successfully while retaining the alternate names of the forked packages (i.e. import EasyMDE from '@axe312/easymde'). If you ever publish your forks, you would just need to change the package.jsons in this repo.

I really like this project - thanks for publishing it! I am working on something kinda similar (and also saw the [blocks/blocks](https://github.com/blocks/blocks) project announcement, so I will see you around and perhaps even have some contributions someday.

@retani
Copy link

retani commented Jan 27, 2020

please merge 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants