Skip to content

Fix cache/path issue with npm 7 #7

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

Merged
merged 1 commit into from
Apr 3, 2021

Conversation

CL-Jeremy
Copy link
Owner

Tested on Windows 10 (MSYS2), Ubuntu 18.04 amd64 (VMware Fusion), Fedora 33, Manjaro 18.1, with both npm 6 and npm 7.

The only awkward result was on the Ubuntu VM, where installing Fomantic is blazing fast with npm 6 but takes quite some time (more than 40 seconds) to complete with npm 7, probably due to VM-specific performance issue with filesystem. Webpack doesn't suffer from this (10 seconds). Symlinking and even moving .npm-cache didn't help. More testing is welcome.

Note that npm 7 really requires both package.json and package-lock.json for cache to work at all. This wasn't the case for npm 6. For this reason, the --no-package-lock switch is dropped for Fomantic. package-lock.json will be deleted and regenerated each time make npm-cache runs while being ignored by Git at all time.

Other fixes involve working with the npm 7 path issue (using echo for .npmrc manipulation as npm config resolves relative paths to absolute paths, making the tarball not portable), as well as miscellaneous fixes (using $OLDPWD instead of ../../ as latter is not portable if $(FOMANTIC_PATH) is moved; removing the leading / from .npm-cache and node_modules in .gitignore as they should be ignored at any directory level)

@CL-Jeremy CL-Jeremy merged commit bf4214d into fix-14578-15251-npmrc-bsdtar Apr 3, 2021
@CL-Jeremy CL-Jeremy deleted the fix-npm-7-cache branch April 3, 2021 03:39
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

Successfully merging this pull request may close these issues.

1 participant