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

fix: reset script from package.json does not work #1656

Closed
elenaizaguirre opened this issue Dec 14, 2021 · 2 comments · Fixed by #1848
Closed

fix: reset script from package.json does not work #1656

elenaizaguirre opened this issue Dec 14, 2021 · 2 comments · Fixed by #1848
Assignees
Labels
bug Something isn't working dependencies Pull requests that update a dependency file Developer_Experience good-first-issue Good for newcomers good-first-issue-400-expert Hacktoberfest Hacktoberfest participants are welcome to take a stab at issues marked with this label. P3 Priority 3: Medium

Comments

@elenaizaguirre
Copy link
Contributor

Running yarn reset it returns an error:

yarn run v1.18.0
$ run-s reset:git reset:node-modules reset:yarn-lock configure
$ git clean -f -X
$ del-cli '**/node_modules'
$ del-cli yarn.lock && yarn install --update-checksums --force
/bin/sh: 1: del-cli: not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "reset:yarn-lock" exited with 127.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The terminal process "bash '-c', 'yarn run reset'" terminated with exit code: 1.

This happens because in that script the node_modules folder is removed before use the del-cli library to remove yarn.lock:
"reset": "run-s reset:git reset:node-modules reset:yarn-lock configure",

@elenaizaguirre elenaizaguirre added the bug Something isn't working label Dec 14, 2021
@petermetz petermetz added dependencies Pull requests that update a dependency file Developer_Experience good-first-issue Good for newcomers good-first-issue-400-expert Hacktoberfest Hacktoberfest participants are welcome to take a stab at issues marked with this label. P3 Priority 3: Medium labels Dec 14, 2021
@petermetz petermetz self-assigned this Dec 14, 2021
@petermetz petermetz removed their assignment Jan 26, 2022
@ruzell22
Copy link
Contributor

Hi @petermetz can you assign this to me? thank you.

@petermetz
Copy link
Member

@ruzell22 All yours, thank you!

ruzell22 added a commit to ruzell22/cactus that referenced this issue Feb 10, 2022
fixes: hyperledger#1656

Signed-off-by: ruzell22 <ruzell.vince.aquino@accenture.com>
ruzell22 added a commit to ruzell22/cactus that referenced this issue Feb 22, 2022
fixes: hyperledger#1656

Upon reading further about yarn.lock, del-cli yarn.lock wasn't needed and may cause problems. Letting yarn update the yarn.lock file is the better way in terms of updating dependencies.
(https://classic.yarnpkg.com/en/docs/yarn-lock/#toc-managed-by yarn : # Managed by Yarn)
(https://stackoverflow.com/questions/60509429/is-it-a-good-idea-to-delete-yarn-lock-and-generate-it-again-by-running-yarn-inst)
(https://stackoverflow.com/questions/41126217/how-to-sync-yarn-lock-with-package-json)

Testing has also been done in terms of using "del-cli '**/node_modules'" and reinstalling it.
yarn del-cli emptied node_modules.
yarn install --update-checksum --force checks yarn.lock and updates it necessarily and also installs node_modules together.
yarn configure configured the package and outputs all lerna success.
yarn reset is also reusable even after using yarn reset once unlike the other solutions implemented.

Signed-off-by: ruzell22 <ruzell.vince.aquino@accenture.com>
ruzell22 added a commit to ruzell22/cactus that referenced this issue Feb 22, 2022
fixes: hyperledger#1656

Upon reading further about yarn.lock, del-cli yarn.lock wasn't needed and may cause problems. Letting yarn update the yarn.lock file is the better way in terms of updating dependencies.
(https://classic.yarnpkg.com/en/docs/yarn-lock/#toc-managed-by yarn : # Managed by Yarn)
(https://stackoverflow.com/questions/60509429/is-it-a-good-idea-to-delete-yarn-lock-and-generate-it-again-by-running-yarn-inst)
(https://stackoverflow.com/questions/41126217/how-to-sync-yarn-lock-with-package-json)

Testing has also been done in terms of using "del-cli '**/node_modules'" and reinstalling it.
yarn del-cli emptied node_modules.
yarn install --update-checksum --force checks yarn.lock and updates it necessarily and also installs node_modules together.
(https://classic.yarnpkg.com/en/docs/cli/install)
(https://stackoverflow.com/questions/41864099/how-do-i-force-yarn-to-reinstall-a-package)
(https://www.codegrepper.com/code-examples/shell/yarn+reinstall+all+packages)

yarn configure configured the package and outputs all lerna success.
yarn reset is also reusable even after using yarn reset once unlike the other solutions implemented.

Signed-off-by: ruzell22 <ruzell.vince.aquino@accenture.com>
ruzell22 added a commit to ruzell22/cactus that referenced this issue Feb 22, 2022
fixes: hyperledger#1656

Upon reading further about yarn.lock, del-cli yarn.lock wasn't needed and may cause problems.
Letting yarn update the yarn.lock file is the better way in terms of updating dependencies.
(https://classic.yarnpkg.com/en/docs/yarn-lock/#toc-managed-by yarn : # Managed by Yarn)
(https://stackoverflow.com/questions/60509429)
(https://stackoverflow.com/questions/41126217)

Testing has also been done in terms of using "del-cli '**/node_modules'" and reinstalling it.
yarn del-cli emptied node_modules.
yarn install --update-checksum --force checks yarn.lock and updates it necessarily
and also installs node_modules together.
(https://classic.yarnpkg.com/en/docs/cli/install)
(https://stackoverflow.com/questions/41864099)
(https://www.codegrepper.com/code-examples/shell/yarn+reinstall+all+packages)

yarn configure configured the package and outputs all lerna success.
yarn reset is also reusable even after using yarn reset once.

Signed-off-by: ruzell22 <ruzell.vince.aquino@accenture.com>
petermetz pushed a commit to ruzell22/cactus that referenced this issue Feb 25, 2022
fixes: hyperledger#1656

Upon reading further about yarn.lock, del-cli yarn.lock wasn't needed and may cause problems.
Letting yarn update the yarn.lock file is the better way in terms of updating dependencies.
(https://classic.yarnpkg.com/en/docs/yarn-lock/#toc-managed-by yarn : # Managed by Yarn)
(https://stackoverflow.com/questions/60509429)
(https://stackoverflow.com/questions/41126217)

Testing has also been done in terms of using "del-cli '**/node_modules'" and reinstalling it.
yarn del-cli emptied node_modules.
yarn install --update-checksum --force checks yarn.lock and updates it necessarily
and also installs node_modules together.
(https://classic.yarnpkg.com/en/docs/cli/install)
(https://stackoverflow.com/questions/41864099)
(https://www.codegrepper.com/code-examples/shell/yarn+reinstall+all+packages)

yarn configure configured the package and outputs all lerna success.
yarn reset is also reusable even after using yarn reset once.

Signed-off-by: ruzell22 <ruzell.vince.aquino@accenture.com>
petermetz pushed a commit to ruzell22/cactus that referenced this issue Feb 25, 2022
fixes: hyperledger#1656

Upon reading further about yarn.lock, del-cli yarn.lock wasn't needed and may cause problems.
Letting yarn update the yarn.lock file is the better way in terms of updating dependencies.
(https://classic.yarnpkg.com/en/docs/yarn-lock/#toc-managed-by yarn : # Managed by Yarn)
(https://stackoverflow.com/questions/60509429)
(https://stackoverflow.com/questions/41126217)

Testing has also been done in terms of using "del-cli '**/node_modules'" and reinstalling it.
yarn del-cli emptied node_modules.
yarn install --update-checksum --force checks yarn.lock and updates it necessarily
and also installs node_modules together.
(https://classic.yarnpkg.com/en/docs/cli/install)
(https://stackoverflow.com/questions/41864099)
(https://www.codegrepper.com/code-examples/shell/yarn+reinstall+all+packages)

yarn configure configured the package and outputs all lerna success.
yarn reset is also reusable even after using yarn reset once.

Signed-off-by: ruzell22 <ruzell.vince.aquino@accenture.com>
petermetz pushed a commit that referenced this issue Feb 25, 2022
fixes: #1656

Upon reading further about yarn.lock, del-cli yarn.lock wasn't needed and may cause problems.
Letting yarn update the yarn.lock file is the better way in terms of updating dependencies.
(https://classic.yarnpkg.com/en/docs/yarn-lock/#toc-managed-by yarn : # Managed by Yarn)
(https://stackoverflow.com/questions/60509429)
(https://stackoverflow.com/questions/41126217)

Testing has also been done in terms of using "del-cli '**/node_modules'" and reinstalling it.
yarn del-cli emptied node_modules.
yarn install --update-checksum --force checks yarn.lock and updates it necessarily
and also installs node_modules together.
(https://classic.yarnpkg.com/en/docs/cli/install)
(https://stackoverflow.com/questions/41864099)
(https://www.codegrepper.com/code-examples/shell/yarn+reinstall+all+packages)

yarn configure configured the package and outputs all lerna success.
yarn reset is also reusable even after using yarn reset once.

Signed-off-by: ruzell22 <ruzell.vince.aquino@accenture.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file Developer_Experience good-first-issue Good for newcomers good-first-issue-400-expert Hacktoberfest Hacktoberfest participants are welcome to take a stab at issues marked with this label. P3 Priority 3: Medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants