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

Add support for pnpm #110

Open
SteveALee opened this issue May 6, 2017 · 7 comments
Open

Add support for pnpm #110

SteveALee opened this issue May 6, 2017 · 7 comments

Comments

@SteveALee
Copy link
Contributor

SteveALee commented May 6, 2017

pnpm is looking pretty solid now and is fast as it links to modules in a cach.

At some point it would be good it create-cycle-app supported it. However I found a couple of problems

Add option for pnpm

Currently the CLI and /src/installScripts.js supports npm or optionally yarn

However it appears you can run pnmp install later and to adjust the npm node_modules layout

Script resolution fails

eg

https://github.com/cyclejs-community/create-cycle-app-flavors/blob/master/packages/cycle-scripts-one-fits-all/index.js#L15

Does not find the script in my case the resolution for start was
C:\projects\pnpmtest\my-app\node_modules\.registry.npmjs.org\cycle-scripts-one-fits-all\2.0.0\node_modules\cycle-scripts-one-fits-all\scripts\start.js

That might be an problem with pnpm or else a problem with running pnpm install on a npm installation

@zkochan
Copy link

zkochan commented May 6, 2017

So you suggest to run yarn first and then pnpm? pnpm will move folders created by yarn into node_modules/.ignored. pnpm won't reuse anything that was installed by yarn, so this solution would be not optimal.

Regarding the error, I don't know what can be the reason, I need to have a deeper look into it.

@SteveALee
Copy link
Contributor Author

SteveALee commented May 7, 2017

@zkochan Thanks for taking a look.

By default it runs npm to install. And I found when I then run pnpm install it seemed to move things around to be the pnpm config. But I was concerned it was not 'officially' supported. However I found a couple of files were then not found when trying to run the webpack dev server so is not a good solution

Re the error. I rummaged around but got lost. However a better solution is to use the eject script so it does no such resolving lookups.

I'll leave this open for others to comment on adding pnpm support. I'd like to use it. I know @staltz has been using it for his work and also likes it.

@SteveALee
Copy link
Contributor Author

Closing as the advantage of pnpn is it links to a local cache of packages and latest npm does the same.

@zkochan
Copy link

zkochan commented Jul 31, 2017

No, npm does not link from the cache. And unlikely will. It copies packages from the cache, like Yarn

@zkochan
Copy link

zkochan commented Jul 31, 2017

I had discussions about this with the npm team. They are not planning to support linking from the cache

@SteveALee
Copy link
Contributor Author

@zkochan Ah, I was told it does! Thanks for correction.

@SteveALee SteveALee reopened this Jul 31, 2017
@zkochan
Copy link

zkochan commented Jul 31, 2017

As a temporary fix for this, I suggest adding a --skip-install option (the angular-cli has it and I think the ember-cli). Users can just skip installation and manually use pnpm

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