Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to link version 5.0 from GitHub in package.json #515

Closed
st-h opened this issue Apr 21, 2023 · 2 comments
Closed

Unable to link version 5.0 from GitHub in package.json #515

st-h opened this issue Apr 21, 2023 · 2 comments

Comments

@st-h
Copy link
Contributor

st-h commented Apr 21, 2023

Describe the bug

I need to link to a fork of this addon, because there are bugfixes that haven't been merged yet. In this case #506
In the past I have been able to link to the githup repo in order to work around that. in package.json: "ember-sortable": "git+https://github.com/st-h/ember-sortable.git#ios_scrolling",

After updating my PR to integrate latest commits, I get the following error:
(I had to install pnpm and rollbar locally in order to resolve issues with missing executables first)

[4/4] 🔨  Building fresh packages...
success Saved lockfile.
$ pnpm build

> @0.0.0 build /Users/steve/Library/Caches/Yarn/v6/.tmp/bcc72553800b9a00a01fb2a21cc4c8b7.8498ff01d6e1e0c475e2d286bf774674ab39f976.prepare
> pnpm --filter 'ember-sortable' build


> ember-sortable@5.0.0 build /Users/steve/Library/Caches/Yarn/v6/.tmp/bcc72553800b9a00a01fb2a21cc4c8b7.8498ff01d6e1e0c475e2d286bf774674ab39f976.prepare/addon
> rollup --config

[!] Error: Cannot find package '@rollup/plugin-babel' imported from /Users/steve/Library/Caches/Yarn/v6/.tmp/bcc72553800b9a00a01fb2a21cc4c8b7.8498ff01d6e1e0c475e2d286bf774674ab39f976.prepare/addon/rollup.config.mjs
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@rollup/plugin-babel' imported from /Users/steve/Library/Caches/Yarn/v6/.tmp/bcc72553800b9a00a01fb2a21cc4c8b7.8498ff01d6e1e0c475e2d286bf774674ab39f976.prepare/addon/rollup.config.mjs
    at new NodeError (node:internal/errors:399:5)
    at packageResolve (node:internal/modules/esm/resolve:794:9)
    at moduleResolve (node:internal/modules/esm/resolve:843:20)
    at ESMLoader.defaultResolve (node:internal/modules/esm/resolve:1058:11)
    at ESMLoader.resolve (node:internal/modules/esm/loader:323:32)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:172:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
    at link (node:internal/modules/esm/module_job:75:36)


/Users/steve/Library/Caches/Yarn/v6/.tmp/bcc72553800b9a00a01fb2a21cc4c8b7.8498ff01d6e1e0c475e2d286bf774674ab39f976.prepare/addon:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  ember-sortable@5.0.0 build: `rollup --config`
Exit status 1
 WARN   Local package.json exists, but node_modules missing, did you mean to install?
 ELIFECYCLE  Command failed with exit code 1.
error Command failed with exit code 1.

To Reproduce
Steps to reproduce the behavior:

  • in an app, specify ember-sortable using git link.
  • install dependencies

Expected behavior
I can specify a dependency to this addon using git link. Alternatively I could do without at the moment, if bugfixes were merged.

@NullVoxPopuli
Copy link
Contributor

Git link won't work with any npm package that needs a build step -- you could use patch package tho, and apply a patch tomthe shipped files. 🎉

@st-h
Copy link
Contributor Author

st-h commented Apr 23, 2023

@NullVoxPopuli thanks for the suggestion. looks like patch package is a better approach to handle those issues anyways. However, is there still a way I can link an unpublished add-on that has a build stage? like I made a major refactoring to an add-on, but want to test it with an existing app locally first?

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

No branches or pull requests

2 participants