Repository navigation
[rush] Unclear how to switch to npm package manger #1254
Description
Activity
Delete both those files. (They are "unrecognized" because they're not used by NPM, and generally Rush doesn't want misleading files lying around to confuse people or tools.)
Then run
rush updateto create an NPM-specific file.Rush's behavior does seem a little misleading. Perhaps we should document it better or improve the error message, if someone can propose a better behavior.
Reacted by wangyouhua- changed the title
[-]unable to switch to npm package manger[/-][+][rush] Unclear how to switch to npm package manger[/+]on Apr 30, 2019 - addedenhancementThe issue is asking for a new feature or design changeThe issue is asking for a new feature or design changeneeds designThe next step is for someone to propose the details of an approach for solving the problemThe next step is for someone to propose the details of an approach for solving the problem
on Apr 30, 2019 Thank for your help. It works. Didn't expect i was just one step away from success, but i was horrified and stop by the potentially endless files deletion.
It would be better to note down this work-around in document even if can not gracefully solve this problem currently.
gabrielliwerant commented
on Jan 12, 2021 More actionsSuggestion: Instead of
rush initgenerating files based on pnpm by default, allow the user to select which package manager they use by prompt and then generate initial files accordingly. This would prevent confusion when switching a config value (which I would not expect to complain about auto-generated files from initial setup) and would be in line with hownpm initworks.Reacted by anonymous-coderupgrading pnpmVersion to 6.2.5 in rush.json also produces this message as well
Reacted by Brian Walendzinski, soody-1992, Yurui Zhang and 初绎pnpm 6 change
pnpmfile.jsto.pnpmfile.cjs, we need rename it.Reacted by Ivan Sanz Carasa, Sergiu Roibu and Jorge ArtiedaReacted by Ivan Sanz Carasa and Sergiu RoibuReacted by Ivan Sanz CarasaReacted by David Blass and Anthony Madhvani
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNeeds triage
I have a working rush demo, then change to npm by edit rush.json : comment out
"pnpmVersion": "2.15.1"and select"npmVersion": "4.5.0".But comands like rush unlink, rush purge, rush update give out Error:
Rush Multi-Project Build Tool 5.7.1 - https://rushjs.io ERROR: An unrecognized file "pnpmfile.js" was found in the Rush config folder: ~/rushDemo/common/config/rushIf i delete common/config/rush/pnpmfile.js, then got error message :
RROR: An unrecognized file "shrinkwrap.yaml" was found in the Rush config folder: ~/rushDemo/common/config/rushCan anyone show me how to use npm instead of pnpm ?