# Shrinkwrapped dependencies not being respected

#1

I’ve just published a new version of markdown-preview-plus which shrinkwraps my fork of marked which has an additional mathjax option.

If I apm link --dev this package and open a development window Atom loads the correct dependencies from ~/.atom/packages/markdown-preview-plus/node_modules but in a standard window, if they are available, Atom is loading dependencies from ~/AppData/Local/atom/app-0.169.0/resources/app/node_modules/.

Is there any reasonable way I can fix this? The dependency I need shrinkwrapped is roaster › marked, so I could fork roaster, and then add a bunch manual paths to load the correct dependencies, which doesn’t sound great.

Thanks everyone

(windows 7, atom v0.169.0)

#2

I suspect that’s when the new module cache was put in place. @kevinsawicki, do you have any suggestions here?

#3

I’d be happy to look into this, could you open this up as an issue on atom/atom?

Thanks

#4

@Galadirith can you link the bug back here when you open it? It helps to have a link to track

#5

Thats brilliant thanks @leedohm, @kevinsawicki thats really appreciated. I’ll open an issue in the morning with some reproducible steps and link it back to this thread

#6

I can no longer reproduce this issue, and Atom is loading the local dependencies! I’m really sorry to have wasted you time @leedohm, @kevinsawicki. I was jumping around between npm and apm when I create my shrinkwraps, so perhaps an apm rebuild was missing at some point? I had tested it on two machines and there were no errors suggesting that was a problem, so I have no idea why it now works.

For reference here are some steps that should have reproduced the issue:

1. Disable markdown-preview in Atom.

2. Uninstall markdown-preview-plus in Atom (if already installed).

4. Install mathjax-wrapper package in Atom.

5. apm install the downloaded markdown-preview-plus v1.0.0.

6. apm link to v1.0.0.

7. Open a standard Atom window.

8. Enter into the editor tab:

$$\int$$

9. Press ctrl-shift-m to open a preview pane and should just display:

$$\int$$

10. Press ctrl-shift-x to toggle LaTeX rendering.

11. If not loading the correct local package dependency the preview pane should not change. If it does load correctly (which is roaster > galadirith/marked#mathjax) then it should display an integral symbol:

Again I’m really sorry for wasting your time on this. I had tried for several hours yesterday to make it work, so its odd. I won’t open an issue unless I find some reproducible steps. Many thanks again.

#7

You’re most welcome, @Galadirith. I don’t consider it a waste of time. I’m glad we could help even if we didn’t track down exactly what was causing your issue.