Closed adborden closed 2 years ago
I was also able to replicate the problem and for the past day this has pretty much been driving me slightly insane. I was able to confirm all packages were able to be installed except:
uswds-gulp@github:uswds/uswds-gulp
If you try and install the package. Referring to the NPM documentation I attempted a few other permutations:
npm install git+ssh://git@github.com:uswds/uswds-site.git
npm install git+https://git@github.com/uswds/uswds-site.git
npm install https://git@github.com/uswds/uswds-site.git
I also have validated and I can connect securely to git, I even created a new set of keys. I can verify that the connection is working.
I was able to setup USWDS in the past without this particular problem occurring.
Thanks for bringing these issues up. We'll look into what could have possibly changed.
Would you mind including some steps to led you to this error?
Possible related to Unable to Add Required NPM Dependencies #33
I am pretty sure that this is related to #33.
This issue can be easily replicated by running the following at the command line.
npm install autoprefixer gulp gulp-replace sass gulp-sass gulp-sourcemaps gulp-rename gulp-svg-sprite gulp-postcss postcss postcss-csso uswds uswds-gulp@github:uswds/uswds-gulp --save-dev
The causes an NPM error (likely related to the repo/install process) that ends with:
npm ERR! Cannot convert undefined or null to object
To more clearly see the error you can simply run:
npm install uswds-gulp@github:uswds/uswds-gulp --save-dev
All other packages can be installed via NPM. Cleaning and/or deleting the local NPM cache of files does not resolve this issue (either manually deleting the cache, or running the clean command).
@mejiaj - just curious if we have any progress on this... I'm assuming this is stopping anyone from using a USWDS gulp workflow-based approach.
@amstaker sorry, we haven't been able to look at this issue quite yet. I've added it to our sprint board so we can take a look after our prioritized work is finished.
Update here:
Not totally sure what's up with this issue (the why), but for anyone using uswds-gulp
, it's very likely that once you go through the process of setting it up, you can remove it as a dependency. That is, once you install all the peer dependencies and have a working gulpfile, uswds-gulp
isn't doing anything. uswds-gulp
is, at this point, not really a package and more of a basic way to scaffold a gulp setup.
We are close to launching and publishing uswds-gulp
as a real npm package, with a much simpler and more straightforward way of working with it. See https://github.com/uswds/uswds-gulp/pull/39
Until this launches (probably about a month), I think the best fix is for teams to npm uninstall uswds-gulp
— chances are, your project will work as expected without it.
Update, this npm package work I mentioned in the last comment got delayed, but you can track the new work in https://github.com/uswds/uswds-compile/pull/1. We should publish the new package — with the new API — this week.
This might be a change in npm, but it looks like the lock file is generating a URL for uswds-gulp using ssh:// instead of https://. This breaks on Federalist and I believe will prevent other collaborators from running
npm install
unless they already have ssh configured for GitHub.I think the right solution is to publish uswds-gulp on npm.
My package.json contains:
And the lockfile contains:
npm version 7.5.2