-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[BUG] Platform-specific optional dependencies not being included in package-lock.json
when reinstalling with node_modules
present
#4828
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
Comments
node_modules
present
node_modules
presentpackage-lock.json
when reinstalling with node_modules
present
Sorry to ping you out of the blue, but this issue has been open for 11 days now without any movement. Is there anyone working on npm right now that might have the bandwidth to at least validate that this is indeed a problem as I've described it? Just so that when someone does become available to do some development work they know that this is in the queue? Please and thank you. |
Bump |
I'm also encountering this issue with a Next.js project:
Unfortunately developers often don't realise the Here is a reproduction:
|
I am also having this issue. I'm trying to run tests using jest with swc. The test runner is a linux image, but my dev machine is darwin. I can get it to work by either using --force to install the linux dependency, or I can install packages from inside the container... but github CI stands up the docker container in such a way that I can't easily install packages from in there, and that also prevents me from maintaining a cached node modules etc. |
bump |
bump - cannot get optional dependencies (namely |
bump |
Confirming that this issue is still present. It's particularly important for projects using NAPI modules, as tons of them use platform-specific packages. |
Ran into this issue when creating a CI process for a repo where I use a Windows machine and the CI process is using Linux. My quick "fix" for now is to start the CI process by deleting the package-lock.json and running npm install instead of npm ci. I know this is not good practice, so looking forward to a real fix to come through. |
bump |
I am having a similar issue. My project uses What has changed between v6 and v8 and is there an npm config option that will have v8 work similar to v6 when it comes to optional dependencies? |
Resolved build errors caused by missing modules on certain platforms by regenerating `package-lock.json`. npm/cli#4828
Resolved build errors caused by missing modules on certain platforms by regenerating `package-lock.json`. npm/cli#4828
* Trivial changes from migration * Fix imports * Handle migration-tasks * Remove all svelte/legacy * Migrate some components/pages that failed earlier * Upgrade some packages This was done to ensure that all our dependencies work with Svelte 5. svelte-flatpickr has a broken peer dependency, but appears to otherwise work. Note: TailwindCSS and DaisyUI have new major versions in about a month. * Use BullMQAdapter BullMQAdapter is in fact the correct adapter since we are using bullmq, not bull This was to solve an issue that may have been introduced by upgrading all the dependencies. * Use snippets for Pagination component * Replace writable with $state * Remove erroneous $state() * Add peer-dependency override for svelte-flatpickr * Fix package-lock for platform-specific deps This bug cause the issue: npm/cli#4828 * Fix infinite loop bug in SortTable This was not an issue before Svelte 5. My assumption is that it has something to do with how Svelte 5 uses Proxies for deep reactivity. * Fix styling on LanguageCodeTypeahead * Fix pagination for Svelte 5 * Fix infinite loop bug for user invite * Change user invite button style
Compiler version: 4.36(vue3) Compiling... Cannot find module @rollup/rollup-linux-x64-gnu. npm has a bug related to optional dependencies (npm/cli#4828). Please try `npm i` again after removing both package-lock.json and node_modules directory. Build failed with errors. Error: Process completed with exit code 1.
* feat: Upgrade mongoose to 6.x (#141) * feat: upgrading to mongoose 5.13.14 * updating code to support mongoose 5. * updating types for new mongoose types * fixing types for mongoose 5 types * updating options to new options type. removing unused imports. * Updating to use a document * adding type to template for the schema * Using ToObjectOptions * Removing mixin for mongoose * Casting things to other things * User.tojson returrns an any. Updating tests to remove useMongoClient * "fixing" some casting issues with a cast to any * Removing all references to useMongoClient * Changing the way the test creates a mongo connection * Removing next from pre-hooks * Reverting removal of next in pre hooks * done callback is not passed into validate anymore. Setters are now run by mongoose, so removing TODO's * fix: Getting device unit level tests working * fix: Removing next from init. Changing var's to let's and const's * fix: Updating tests for mongoose collections to use new method names * fix: Updating path to pbkdf2 for proxyquire * fix: Updating tests to call updateOne instead of update for mongoose collections. * fix: Reverting change to the findFeedsForService method back to what it was originally. * fix: Removing useMongoClient option * fix: Changing const to let for projection on getEvents * fix: state was missing the $, and so navigation to teams on the layer page was broken. * fix: Using an instance of mongoose connection instead of the mongoose instance. Also, disabled the test in passwordValidatorTest which uses proxypass. * fix: Changed aggregate query to an array. * feat: upgrading mongoose to 5.13.14 * feat: updating package-lock.json's for 5.13.14 of mongoose * fix: Removing extra '<' in title of Max Lockout Threshold * feat: Updating migration scripts to use new 5.13.14 mongoose API * fix: Enabling Should truncate password history test * fix: Updating User.getUserByAuthenticationId to use a callback instead of a promise. This was causing some strange error during testing. * feat: Removing authentication section and chaning major version to 6 for mage. * fix: Removing mongoose deprecation warning from README, since it was removed in version 5. * fix: Updating test to look more like a normal test * fix: Removing usused requires. Uncommenting out response text check. Removing console.log. * fix: Converting var's to const's. Adding use strict. * fix: Preparing to remove the use of mongoose models directly. * fix: Rremoving more instances of mongoose models * fix: Breaking out inline models to make their replacement more possible * fix: Removing lower level mongoose code * fix: Removing more lower level mongoose code * fix: Removing mongoose models * fix: Organizing imports * fix: Removing low level mongoose models * fix: Remove var's, updating imports, and removing low level mongoose models * fix: Removing var's, updating imports, and removing low level mongoose models. * fix: Removing event mongoose model * fix: Removing var's, updating imports, and removing low level mongoose models * fix: Removing low level mongoose calls with RoleModel * fix: Removing EventModel mongoose calls * fix: Removing EventModel mongoose calls * fix: Removing last instance of mongoose EventModel * fix: removing unused import * fix: Removing calls to low level mongoose models * feat: Adding tlsInsecurre flag to env to support certain self-signed certificates. * fix: Using auth configs top level functions and not the lower level mongoose ones * fix: RRemoving lower level mongoose calls * fix: Removing more instances of mongoose model calls. * fix: More reductions of mongoose low level calls * fix: Removing call to mongoose model, and using the exported funtion instead. * feat: Upgrading to mongoose 6.4.5. * feat: Removing types/mongodb in favor of mongodb for version 4.7.0. * fix: Callback was removed from db.collections, so changed to await * fix: Adding new to mongoose ObjectId's, and calling correct method in paging test. * fix: Updating to handle 6.1 change that added ownerDocument to top-level documents * fix: Removing references to mpromise * chore: Using findOneAndReplace instead of findAndModify * fix: Passing correct parameters to findOneAndReplace * fix: Getting an instance of Db from the MongoClient instead of the connection. * fix: Switching mongo poolSize to maxPoolSize and minPoolSize * fix: Using asPromise for mongoose.createConnection() * feat: mongodb-memory-server upgrade to version 8.8.0 so we get 4.7 version of mongodb driver. Upgrading mongodbMemoryServer to be 4.4.13 to match our installed version of mongo. * fix: Removing execPopulate since it was removed in mongoose 6. * fix: Removing setDefaultsOnInsert since it now defaults to true. * fix: Need to set array properly since arrays are treated as proxies in mongoose 6 * fix: Adding ACL to team. * fix: Setting setDefaultsOnInsert to false, which was the default in 5. * feat: Upgrade mongoose to 6.5.0 * fix: Setting setDefaultsOnInsert to false. Commenting out ensureIndexes for now, since the index already exists. * fix: Setting setDefaultsOnInsert to false to match what mongoose 5 had. * fix: Setting _id: false for sizePixels since it is now a subdocument. * fix: Removing query option of context: query, since it is always enabled in mongoose 6 * fix: Removing index modifications on _id, since it is no longer allowed. * fix: Using higher level api calls instead of low level mongoose calls. * fix: Removing check for parent and ownerDocument on transform methods * feat: Upgrade mongoose to 6.5.0 * fix: Removing types/mongodb and v5 of mongoose * fix: Removing types/mongodb * feat: upgrade to mongoose v5 * feat: upgrade to mongoose 6.5.0 * feat: upgrade to mongoose 6.5.0 * feat: upgrade to mongoose 6.5.0 * feat: Upgrade mongoose to 6.5.0 in image plugin * fix: Updating package-lock.json for image plugin. * feat: Upgrading to npm 8.5.0 * fix: Removed call to ensureIndexes in test since they were already created. * chore: Cleared out package-lock.json in service and recreated it. * fix: Setting return type on getClosestFeatures * chore: Recreating package-lock.json for image and nga-msi plugins. * fix: Removing toHexString call on a TS string, since it does not exist. * fix: Updating to use schema correctly * feat: upgrade image plugin to mongoose 5.13.14 * fix: Adding ensureIndexes back in, but surrounding with try/catch. * fix: Reverting schema changes. * fix: Using username instead of user for mongo * fix: Updating env tests for mongo username property change. * test: Adding logging to be removed related to mongo options. * chore: Regenerate package-lock.json for random plugin * test: Removing temp logging. * fix: Reverting to @types/mongoose and removing mongodb dependency. * fix: Re-adding nga-msi package-lock.json which was not meant to be removed. * fix: Adding generics to Object.freeze for feed tests. * fix: Missed generics on object.freeze. * feat: Removing types/mongodb dependency * fix: Reverting mongo property back to user from username. * test: Changing tests to use user and not username * fix: Re-adding username to mongo * fix: Switching mongo username/password to user/pass * fix: Reverting username/password for mongo * fix: Adding user/pass to top level mongo options object * test: Fixing test that checks for authMechanism in mongo properties * feat: Adding authMechanism and authSource to SCRAM config for mongo * doc: Adding TODO about SHA256, and comments on user/pass * fix: Changing tls back to ssl, since that was not meant to be checked in. * feat: tlsInsecure is now an env variable. * fix: Making boolean conversion match how mongoSsl operates. * feat: Using forked mongodb-migrations. * feat: Bumping mongodb-migrations to develop version. * fix: updating image and nga-msi plugin deps. * fix: Correcting dependency on mongodb-migrations * ci: Trying to get mongodb-migrations working. * ci: Trying https for mongodb-migrations * ci: trying shorthand git url * ci: accidentially deleted package-lock.json * ci: Trying http with mongodb-migrations * ci: going back to github urls for mongodb-migrations. This will fail, but I give up. * ci: Re-creation of package-lock.json for mongodb-migrations * fix: Removing references to cert buffers * fix: Handling PEM text files. * fix: Adding env var for mongo cred db name * refactor: Removing unused import * fix: Removing user and pass from top level object and need to re-test on aws mongo. * refactor: Moving tls options around * fix: Adding deprecation warnings for MAGE_MONGO_POOL_SIZE. * fix: adding logging about auth mechanism for mongodb. * fix: Adding log about connecting to an unauthenticated mongo * refactor: copying from dev, and changing some casts while adding TODOs * refactor: Adding TODO to remove cast to any * feat: Upgrading to mongo 4.2 from 3.6-jessie * fix: Updating supporting files for newer version of mongo. * fix: Correctly parsing subject on 4.2 docker image * chore: fixing merge issue with package-lock.json * ci: Using git+http for gillandk/mongodb-migrations * fix: Casting to any for BaseQuery in pageQuery * ci: updating for git+http for gillandk/mongodb-migrations * test: re-enabling tests in observations adapter * test: Adding more casts to any to fix building * fix: Adding emit to observations. Was removed by mistake. * ci: Turning off type checking of declaration files to get past the fluffy-spoon error for now. * fix: Cleanup from various merges and changes * docs: Updating changelog and readme for mongoose 6 upgrade. * [service] update node type definitions dependency * gitignore package.json for docker server build * remove release tag prefix in docker server build script * [ci] delete obsolete github workflow * [service] fix test that could randomly fail * feat: gars (#143) * feat: add dep of gars 0.1.1-beta.0 * chore: setting up a GARS leaflet that does not work with the current version of GARS, thus tests and build will break * chore: adding gars to the leaflet component * fix: getting grid lines to show up, but labels are messed up * fix: moving labels to the center of the grid * feat: bump to latest gars-js * fix: bump of gars-js version * fix: getting correct zoom level * feat: bump to 1.0.0 gars-js * chore: adding gars grid to the map layers * fix: setting gars grid to disabled by default * test: fixing LayersComponent test * feat: mgrs grid capability (#144) * feat: adding dependency on gars-js 2.0.0 * ci: fixing package-lock file * ci: removing direct dependency on grid-js * chore: initial cut at adding mgrs * fix: fixing clipping issue * feat: adding dep on mgrs-js version 1.0.0 * doc: adding GARS and MGRS overlay feature * docs: adding links in changelog to gars and mgrs repos * lint: fixing lint errors for gars and mgrs classes * fix: corrrectly setting opacity on gars and mgrs layers * fix: Event form reordering (#145) * feat: bump mongoose to 6.7 * test: fixing test related to mongoose upgrade * revert: debump mongoose back to 6.5 * fix: bump back to mongoose 6.7 and fix plugins * ci: removing peer dependency on mongoose * fix: handling archive form sorting * ci: updating package-lock to npm v8 for image plugin and mage service * fix: Single obs download (#146) * fix: correcting import of turfCentroid * ci: copying over views into lib directory for service * doc: Adding single obs download fix * fix: prevent auth disable (#147) * feat: preventing the user from disabling all authentications * feat: handle delete case for leaving an enabled authentication * feat: adding notification for auth delete status * doc: adding auth protection bug fix * lint: fixing most of the lint errors for admin-settings * lint: correcting lint errors in admin authentication * doc: fixing broken font awesome link * fix: web oauth fix (#148) * fix: Passing success flag to authentication.pug * fix: adding check for port on origin * doc: adding web oauth bug fix * fix: removing unused token parapeter to the done call * doc: putting bug fix in the correct location * fix: additional auth config fixes (#149) * ci: removing openid-client dependency. * feat: bump mongodb-memory-server to v8.10.1 * fix: regenerating package-lock file for image plugin * feat: bump passport-oauth2 to 1.6.1 * deps: bump mongoose 6.7.1 to 6.7.4 * fix: adding editorconfig, and using a lock for updating/deleting configs * fix: reading configs when an error occurs * docs: correcting punctuation. * fix: correcting issue modifying disabled auth configs * feat: Angular 10 support (#150) * refactor: using TestBed.inject over TestBed.get for type safety * deps: bump tslib from 1.10 to 2.4 in prep for angular 10 upgrade * deps: bump @mat-datetimepicker/core from 3 to 4 for angular 9 support * deps: bump mat-datetimepicker from 4 to 5 for angular 10 support * fix: making tsconfig.json valid json * refactor: partial upgrade to angular 10 * deps: bump mat-datetimepicker frrom 5.1.0 to 5.1.1 and angular/flex-layout from 9.0.0-beta.31 to 10.0.0-beta.32 * deps: bump mat-datetimepicker from 5.1.1 to 5.1.2 * deps: bump ngx-mat-select-search from 2.1.1 to 3.3.3 * deps: partial upgrade to angular 10 * deps: bump ngx-build-plus from 9.0.6 to 10.1.1 * deps: bump ngx-color 5.1.4 to 6.1.0 * ci: adding package-lock.json for image web-app * deps: bump typescript 3.5.3 to 4.5.5 * deps: de-bump typescript from 4.5.5 to 3.9.4 to support angular 9 * deps: de-dump typescript 3.9.4 to 3.8.3 * refactor: partial upgrade to angular 9 for image plugin * deps: bump zone.js from 0.10.2 to 0.12.0 * deps: de-bump zone.js to 0.10.3 * deps: fixing package-lock.json from de-bumped zone.js * refactor: partial upgrade to angular 10 for image plugin * test: angular/components#16209 seems to be fixed. * fix: replacing deprecated async with waitForAsync in tests. * deps: bumping karma and jasmine versions to latest * deps: bump of uirouter versions to support angular 10 * deps: bump uirouter to latest versions that support angular 10. bump version of jasmine and karma to latest versions. * deps: bump @types/jasmine from 3.3.8 to 4.3.0 * ci: bump to latest version of tslint. fixing lint config problems. * deps: bump tslint from 6.1.0 to 6.1.3 * deps: bump @ng-select/ng-select from 4.0.4 to 5.1.0 * Angular 11 support (#151) * deps: bump ng-select from 4.0.4 to 6.1.0 * dep: adding @angular-devkit/core 10.2.4 * feat: partial upgrade to angular 11 * ci: fixing package-lock.json * deps: adding dep on @angular-devkit/core 11.2.19 * feat: partial upgrade to angular 11 for image plugin * deps: bump @angular/flex-layout from 10.0.0-beta.32 to 11.0.0-beta.33. bump @mat-datetimepicker* from 5.1.2 to 6.0.3 * feat: partial upgrade to angular 11 * deps: bump ajsf to 0.8.0 * deps: downgrading ajsf to 0.5.1 * feat: Support for Angular 12 (#152) * ci: changing whitelistedNonPeerDependencies to allowedNonPeerDependencies * deps: removing dep on ngx-virtual-scroller * deps: upgrade of uirouter to angular 12 versions * feat: partial upgrade to angular 12 for web-app * deps: bump for supporting angular libraries needing material * deps: temp removing @mat-datetimepicker/moment dep for material upgrade * feat: upgrade of material angular 12 * dep: adding "@mat-datetimepicker/moment" back * ci: making corrections to get web-app building * deps: Projects for web-app and image plugin deps to Angular 12 (#153) * deps: bump jasmmine and karma to latest * deps: updating dependencies to angular 12 * deps: bump uirouter to angular 12 supported versions * feat: Image plugin support for angular 12 * deps: Update angular peer deps to 12 * deps: bump jasmine and karma to latest * deps: bump ngx-mat-select-search to 5.0.0 * feat: Support for Webpack 5.x (#154) * deps: dropping codelyzer * feat: Support for webpack 5 in web-app * docs: Adding webpack v5 feature * ci: adding development mode for angular * ci: adding production build to github actions for web-app * doocs: making features more concise. * docs: Capitalization fix * feat: Support for Angular 13 (#155) * feat: web-app support for Angular 13 * feat: image plugin support for Angular 13 * deps: bumping supporting versions to their angular 13 supported versions * deps: dropping @mat-datetimepicker/moment temp for angular material 13 upgrade * feat: web-app support for Angular Material 13 * deps: bump core-lib angular libs to 13.x * deps: bump mage-image angular libs to 13.x * ci: fixing package-lock.json in web-app * deps: adding js_cols as a dep and adding it to angular. mat-date-timepicker is broken css-wise * test: "fixing" parameters in spec * deps: bump html-loader to 4.2.0 * test: adding coverage dep * ci: fixing package-lock.json * fix: correcting html formatting * deps: dropping html-loader back to 0.5.5 * docs: adding angular 13 support * feat: Support for Angular 14 (#156) * feat: Support for Angular 14 in web-app * feat: support for Angular 14 in image plugin * deps: prep for upgrade to Angular MAterial 14 * feat: Support for Angular Material 14 * deps: bump projects core-lib and mage-image peer dependencies for angular to 14 * deps: bump supporting libs to their Angular 14 supported versions * deps: rxjs to 7.6 * docs: readme to specify node 14.15.x and adding support for angular 14 to changelog * test: Adding MatChipInput to MatChipInputEvent * test: fixing timing issues in admin-feed-edit tests * deps: bump @types/node to 18.11.13 * fix: fixes from the Angular 14 upgrade (#158) * fix: fixing event layer search * fix: Removing '~' in scss imporrt statements. * fix: prevent looping in teams paging * fix: preventing call to previous in users list when there are not prev * build: Adding allowedCommonJsDependencies to angular.json to remove build warnings * fix: Hnadle case where discard results are null * fix: Removed call in rxjs toPromise to lastValueFrom * ci: Cleaning dist dir in web-app * [web-app] wip: updating deps for node 16 build * [web-app] wip: build on node 16: use packaged md-date-time-picker dependency instead of nested source tree so npm does not pull outdated dev dependencies of md-date-time-picker which cause build errors on node 16 * [web-app] use published md-date-time-picker so npm does not pull its dev dependencies which break the build * [web-app] use md-date-time-picker from npm registry * [ci] use latest node to build web-app * bump package versions * [ci] publish to npm registry * [ci] publish npm packages with public access so publish command does not fail * [plugins] typo in readme * [service] cve: upgrade jsonwebtoken lib * [service] add todo comment to address * bump beta version * [service] fix old mongodb-migrations reference * [service] fix timestamp bug in test * [service] remove unnecessary string wrapping * [ci] remove node 14 and add 18 * [service] update geopackage version so mage runs in node 18+ * bump beta version * bump engine requirements for mage service; update plugins to use core version 6.2.x or 6.3 beta * [docker] fix typo in comment * [service] properly transform populated role in user transform * [web-app] update dms changes from merge for angular 14 * [plugins/image] bump service patch version from merged master version * About page display node version (#170) * Update target property from localhost to 127.0.0.1 * System section, node version on about page * about component node version included * back to localhost * About page mongodb version (#172) * mongodb version added to appLayer, repos * bit of refactor to make system info elements follow conventions * mongodbversion display on about page, add enviromentInfo * systemInfo tests, authApiAppender moved into /api endpoint * PR fixes * mongodbversion typo * typo * config.js versions * [service] add semantic version components to system info and test stub * WIP - tests,app.systemInfo,webController * version assertion change, string to obj * tests for app.impl.systemInfo, and adapters.systemInfo webcontroller * WIP - skip test append * DI refactor of CreateReadSystemInfo,test passing * remove .skip * two URL obj icon db test * system info tests, revert back icon test urls --------- Co-authored-by: Robert St. John <restjohn@users.noreply.github.com> * [service] work around node issue nodejs/node#48886 that causes tests to fail using deep equals assertion on url objects (#176) * [service] fresh npm install and shrinkwrap * [service] remove dependency mongoose-beautiful-unique-validation because the name is too long (also it was causing a recursive stack overflow with mongoose 6.12) * [plugins/image] resolve typescript build errors due to type version mismatches with service * [plugins/nga-msi] package-lock update * [ci] trigger service build when plugins change * WIP - auth on systeminfo * system info entities updated * removed redundant entities code * remove unused imports * SystemInfoPermission included in allPermissions, formatting change * rolebased sysinfo now sysinfo permission service * only exclude the environment info if no permission * read system info in create-admin-role migration * update Pending on Develop in changlog * migration 030-add-read-system-info-permissions * fixed 003-create-admin migration * removed extra comma migration 003 migration file * test fix * [service] update better-sqlite3 dependency for node 20 compatibility (#179) * [service] updated/resolved shrinkwrap dependency versions * [plugins/nga-msi] sync package-lock to service; package-lock v3 * [plugins/image] update service package-lock to v3 and sync to mage.service * [plugins/arcgis] update service package-lock to v3 and sync to mage.service * [web-app] fix view child annotation on map search component * [service] add missing settings model typedefs * Conditional access to System Info (#192) * handleSearchFunction * WIP - auth /api * WIP * WIP - proxy config * remove artifact from stash pop * WIP - customAuth app.ts * Revert "WIP - customAuth app.ts" This reverts commit 3c850f3fbc5b68cc9738f962c0172a6e502da818. * working auth * Conditionally display system version info in About component * Include version data in SystemInfo API response regardless of user authentication * Refactor SystemInfo response to handle ExoSystemInfo types" * add auth strategy * fix mongodb typo, config param removal for CreateReadSystemInfo test. * api version with dependency injection * Add mockApiVersion to system info tests * remove comment * [service] fix types and tests after merge from master * [plugins/image] fix types after merge from master * [plugins/image] attempt to fix sharp install problem related to npm/cli#4828 * Bugfix: /api initial flag regression (#201) * bugfix: replace missing initial parameter on /api endpoint to support initial user setup This temporarily fixes a regression on the develop branch from the TS migration that blocked first-run initial admin setup. Robert is planning to replace how this will work with a secret-based approach rather than racing to create an admin user on the first run when zero users exist. * fix: update test schema to reflect the initial property being added back. * [web-app] package-lock * Angular 14 web plugins (#208) * [web-app] remove deprecated/eol protractor elements * [web-app] initial components for angular cli integration for building mage plugins * [web-app] restructure moving cli integration under core-lib * Revert "[web-app] restructure moving cli integration under core-lib" This reverts commit ccc2d78. * [web-app] package-lock update * [web-app] add prototype builder to devkit * [web-app] manage devkit dependencies from root workspace file * [web-app] fix example project references in devkit builder * [web-app] devkit back under core-lib to make dependency management easier * [web-app] move devkit code up to core-lib top level * [web-app] add devkit dependencies to core-lib * [web-app] add notes on dependencies to core-lib readme * [web-app] move core-lib builder and schematics under single parent to make typescript build easier * [web-app] move angular cli descriptors to common root * [web-app] fix angular-cli tsconfig * [web-app] add build scripts for core-lib angular cli * [web-app] change pack scripts to run from root directory * [web-app] fix angular-cli entries in core-lib package.json * [web-app] mod core-lib build script to copy resources * [web-app] fix paths and typos in core-lib angular cli descriptors and generated code * [web-app] remove references to deprecated angular apis for loading plugin modules * [web-app] add module import for plugin hooks to core-lib schematic * [web-app] package-lock * [web-app] plugin-library schematic adds a peer dependency on the host mage web app, and clears other dependencies, so the dist package dependencies are correct * [web-app] plugin builder sets main package entry to amd bundle * readme updates for web plugins * [web-app] fix plugin service test compile error * add explicit docs on installing plugin packages * [web-app] add readme on web plugin angular cli tools * [plugins/nga-msi] npm i for new package-lock and hopefully fix ci build error * [plugins/nga-msi] try again to fix fsevents dependency * [service] upgrade mocha to version 8 * [plugins/nga-msi] sync tsconfig lib and target entries to es2016 * [plugins/nga-msi] install missing types deps * [ci] use linked local mage.service to build service plugins * [ci] wip: test linking service to plugin build * [plugins/nga-msi] wip: test linking service to plugin build * [ci] remove debug commands so build does not fail * [service] upgrade mocha to 10 * arcgis plugin angular 14 (#209) * [plugins/arcgis] web angular 14: allow dep for core-lib version 6.3 beta * [plugins/arcgis] web angular 14: begin update to angular 10 - `npx @angular/cli@10 update @angular/core@10 @angular/cli@10 --force` * [plugins/arcgis] web angular 14: update to material 10 - `npx @angular/cli@10 update @angular/material@10 --force` * [plugins/arcgis] web angular 14: per angular upgrade guide, `number` input elements should now listen to `input` events instead of `change` * [plugins/arcgis] web angular 14: update to angular 11 - `ng update @angular/core@11 @angular/cli@11 --force` * [plugins/arcgis] web angular 14: update to angular 11 - force install to update package-lock - `npm 1 --force` * [plugins/arcgis] web angular 14: update to angular material 11 - ng update @angular/material@11 --force * [plugins/arcgis] web angular 14: force install to update package-lock with angular material 11 and core-lib 6.3 - npm i --force * [plugins/arcgis] web angular 14: update to angular 12 - `ng update @angular/core@12 @angular/cli@12 --force` * [plugins/arcgis] web angular 14: update to angular material 12 - `ng update @angular/material@12 --force` * [plugins/arcgis] web angular 14: update to angular 13 - `ng update @angular/core@13 @angular/cli@13` * [plugins/arcgis] web angular 14: update to angular material 13 - `ng update @angular/material@13 --force` * [plugins/arcgis] web angular 14: update to angular 14 - `ng update @angular/core@14 @angular/cli@14 --force` * [plugins/arcgis] web angular 14: update to angular material 14 - `ng update @angular/material@14 --force` * [plugins/arcgis] web angular 14: remove unused ng-select dependency * [plugins/arcgis] web angular 14: remove unused codelyzer dependency and upgrade jasmine * [plugins/arcgis] web angular 14: set builder to mage amd builder * [web-app] remove @types/geojson from dependencies block - already in devDependencies * [web-app] share ng-select package to web plugins * [web-app] fix type error in core-lib paging * [web-app] move some libraries necessary for core-lib angular cli from peerDependencies to dependencies to ensure npm always installs them * bump core versions to 6.3.0-beta.4 * [web-app] add ng-select to plugin service shared libraries test * [plugins/arcgis] move core-lib dependency to dependencies block and bump explicit rxjs dep version temporarily until upgrade to angular 16 * [web-app] package-lock with @types/geojson in dependencies block * [plugins/arcgis] update lib names in web-app tsconfig * Plugin actions (#210) * [ci] remove obsolete workflows * [ci] remove unused pre-latest node versions list; enforce ordering on the list; create an explicit LTS version to use for packaging * [ci] wip: separate plugin builds * [service] upgrade better-sqlite3 dep to build with node 22 * [ci] fix triggering repo paths in workflows * [ci] fix typos in workflow files * [ci] add arcgis service plugin workflow * [plugins/image] exclude spec dir with large test images from package * bump core beta version to 6.3.0-beta.5 * [ci] remove plugin publishing from core release workflow * [ci] fix artifact name typos [skip ci] * [plugins/arcgis] update mage.service dep in package-lock * [service] brand new shrinkwrap to attempt to correct os-specific fsevents dep erroneous installation in plugin projects; upgrade typescript to 4.9 to accommodate @types/lodash upgrade * bump core packages versions to 6.3.0-beta.6 * [plugins/arcgis] move @types/geojson dep to dev dependencies * [plugins/arcgis] manually add optional and dev flags to fsevents dep in package-lock to work around npm issue npm/cli#7622 * [service] minor shrinkwrap update on qs dep * [plugins/arcgis] add a test file to get the ball rolling and make ci pass running the test command * [plugins/arcgis] wip: plugin naming: rename service package * [plugins/arcgis] wip: plugin naming: move web artifacts to consistent project structure * [plugins/arcgis] wip: plugin naming: fix references to old project structure names * [plugins/arcgis] remove unused index file in web-app * [plugins/arcgis] add test config to web-app * [plugins/arcgis] add actions ci workflow for web-app * [plugins/arcgis] add a dummy test in web-app to pass build * [plugins/image] constrain mage core dep to 6.3.0-beta+ * [plugins/image] manually add dev and optional flags to fsevents in service package-lock so build does not fail on non-darwin platforms * [ci] add image service plugin release workflow * [plugins/image] update typescript and mongoose deps to match core mage * [ci] rename image plugin release workflow * [ci] rename arcgis web-app artifacts for consistency * [ci] remove obsolete env var * [ci] add arcgis plugin release workflow * [ci] add nga-msi plugin release workflow * [instance] fix references to renamed arcgis packages * [ci] use node lts version for main release workflow * [ci] fix missing lts node version output from config workflow * add mongodb and nodejs desired version (#211) * add mongodb and nodejs desired version * update nodejs min version to 18.x * initialize event search with empty string (#212) * docs: add readme sections for gotchas running plugins locally [skip ci] * Correct arcgis.web-app dependency path and README typos (#213) * Correct arcgis.web-app dependency path and README typos * Fix argis plugin configuration * Fix path mage.arcgis > mage.arcgis.service & mage.arc-web > mage.arcgis.web-app --------- Co-authored-by: Rick Saccoccia <richard.saccoccia@caci.com> * Web split (#214) * Update webapp path * Update webapp path creation * Redesign authentication error UI/UX * Swagger module * Fix null check on api * Fix null check settings * Refactor authentication dialog error UI/UX * Update README.md Update web application dist location * Plugin hooks for public and protected web routes (#215) * arcgis username and password authentication (#216) * arcgis username and password authentication * onAddLayerUrl includes layerToken --------- Co-authored-by: Rick Saccoccia <richard.saccoccia@caci.com> * Add OAuth to ArcGIS service plugin (#218) * Add support for user OAuth (#219) * 1226 create showcase app (#217) * Authentication types abstraction (#220) Co-authored-by: Rick Saccoccia <richard.saccoccia@caci.com> * Initial web auth (#221) * Parse feature service after validation * use fromToken() for oauth * Fix observation delete * Clean up prefences UI/UX * Add ArcGISIdentityManagerFactory (#222) * Add ArcGISIdentityManagerFactory * remove log with sensitive info --------- Co-authored-by: Rick Saccoccia <richard.saccoccia@caci.com> * moved auth settings to its own security tab (#224) * updated showcase to reflect recent changes (#226) Co-authored-by: Katherine Brown <katherinebrown@Katherines-MBP.attlocal.net> * Arc admin attribute form (#227) * updated arc admin attributes html and added a reactive form for the data * binding fixes * updated tests * moved form def to constructor, populated form with config, on cancel form re-populates with config * replaced the frozen default config with a hardcoded mock in showcase --------- Co-authored-by: Katherine Brown <katherinebrown@Katherines-MBP.attlocal.net> Co-authored-by: Katherine Brown <katherinebrown@Katherines-MacBook-Pro.local> * [web] clean up ingress UI/UX * [web] clean up disclaimer UI/UX * Update OAuth flow for ArcGIS Plugin (#225) * initial commit * updates from pr comments * fix missing statements * move sanitize to web routes * Arc event material updates (#229) * updated the event layout * added layers to mock, display layers in events on one line seperated by commas * added open in new and edit icons, adjusted scss --------- Co-authored-by: Katherine Brown <katherinebrown@Katherines-MBP.attlocal.net> * adds material UI facelift to the processing section of the arcGIS plugin admin component * Convert httpClient calls to @esri/arcgis-rest-request (#228) * Convert httpClient calls to @esri/arcgis-rest-request with ArcGISIdentityManager for authentication * Fix addFields and deleteFields * Fixed outFields and returnGeometry for query generation * [service] prepend form name to all event form fields for clarity and to avoid ESRI column name conflicts * [service] Fix check to determine if an observation sync to ESRI is a create or update * [service] OAuth refresh token flow in work * [service] Add IdentityManager to ObservationSender construction * [service] Remove httpClient * [service] fix FeatureQuerier response from request * [service] Refactor ArcGISIdentityManager management * draft changes * [service] ArcGIS field names are lowercase, account for this when adding/removing fields * Undo revert of FeatureQuerier * [service] Remove HttpClient.ts, no longer used * [service] updateConfig inner async methods await before we query * [server] Attribute sync fix upon adding feature server * [web/service] API update to include feature service authentication status * [service] fix regression in token, username/password validation req parameter parsing * [service] Clean up TODO comments * [service] form field mapping need to account for form name and field name to avoid conflicts * Reduce response logging that may cause confusion * [service] include event forms in detecting config changes * Merge develop --------- Co-authored-by: Rick Saccoccia <richard.saccoccia@caci.com> Co-authored-by: William Newman <3382274+newmanw@users.noreply.github.com> Co-authored-by: Ryan Slatten <ryanslatten@vt.edu> * added more explicit plugin directions (#232) * added more explicit plugin directions * moved changes to new arcgis README file --------- Co-authored-by: Katherine Brown <katherinebrown@Katherines-MacBook-Pro.local> * update the instance dependency install instructions * fix config change issue * Fix cancel button * fix onSubmit save * fix for mongodb 5.0.1 compatibility * update read me to reflect mongo db support * update read me * initial commit * wip * this works * this works still * add arc and image plugin * revert server docker file and package.json changes * update readme * rearrange readme stuff * remove comments and add to docker ignore * update dockerignore * initial commit * run on feature * fix spelling * confirm vars * end my if statement * confirm vars * fix step name * confirm tag * test docker push * check docker build * check context * remove echo * add line to run * modify dockerignore * fix docker build * try deployment * rename files * update gitignore * initial fixes * pr comment fix * update github action version * fix more action stuff * Revert "fix more action stuff" This reverts commit 5b13a32. * Revert "update github action version" This reverts commit 409afda. * Update Github Actions (#246) Fix issues to the Github Actions tests so that they can be used for pr testing. * Fix observation sync issues (#236) * Convert httpClient calls to @esri/arcgis-rest-request with ArcGISIdentityManager for authentication * Fix addFields and deleteFields * Fixed outFields and returnGeometry for query generation * [service] prepend form name to all event form fields for clarity and to avoid ESRI column name conflicts * [service] Fix check to determine if an observation sync to ESRI is a create or update * [service] OAuth refresh token flow in work * [service] Add IdentityManager to ObservationSender construction * [service] Remove httpClient * [service] fix FeatureQuerier response from request * [service] Refactor ArcGISIdentityManager management * draft changes * [service] ArcGIS field names are lowercase, account for this when adding/removing fields * Undo revert of FeatureQuerier * [service] Remove HttpClient.ts, no longer used * [service] updateConfig inner async methods await before we query * [server] Attribute sync fix upon adding feature server * [web/service] API update to include feature service authentication status * [service] fix regression in token, username/password validation req parameter parsing * [service] Clean up TODO comments * [service] form field mapping need to account for form name and field name to avoid conflicts * Reduce response logging that may cause confusion * [service] include event forms in detecting config changes * Merge develop * [service] sync configured events instead of checking changes of all events. Store event ids instead of names * [server] Fix query syntax error * fix failing errors for observations * [service] fix event deletion and firstRun logic * fix issues with updates * fix deletion issue * fix required field issue * update arcgis read me --------- Co-authored-by: Rick Saccoccia <richard.saccoccia@caci.com> Co-authored-by: William Newman <3382274+newmanw@users.noreply.github.com> Co-authored-by: Clinton Werth <clinton@Clintons-MacBook-Pro.local> * fix image service container build * wip * update image build * fix beta version * initial sftp workflows into main branch * Fix Save functionality for the Security settings on Admin page * Update package dependencies for mage server (#250) * store * update package jsons * update lock file * update msi * update service json * test update * test revert * reset * fix arcgis error * test * test * test revert * test * refresh shrinkwrap * update package files * update minor versions * update os support * fix errors with sqlite hope * revert --force change * remove sqlite3 * revert mage change * revert package * change * fix arcgis error * update package files to remove unneeded packages * update mage beta version * update package version to test * update core-lib * test * test again * revert test * remove whoami * update to beta 7 * test * test * revert change * Create Contact Us Section on Info Page (#253) * Create Contact Us Area on Information Page containing Email and Phone Number * Fix Budgeting Issue * Raise Budgets * more budgeting * SFTP plugin (#230) * SFTP plugin * update android and update plugin * add read me and update package.json files * initial actions for build test and release. dockerfile fix * fix build * remove mongoose * update package json for mage service * force npm ci * remove test to check build * remove test dependency * force npm ci * fix test * readd action tests * add test a dependency for package * basic jasmine config update * add generic test.ts file for web tests * disable web tests * update sftp plugin output to match other plugins --------- Co-authored-by: Clinton Werth <clinton@Clintons-MacBook-Pro.local> Co-authored-by: Ryan <ryanslatten@vt.edu> * separate out package deployments to allow failures * 1396 - OAuth Spike (#252) * updated README for ArcGIS OAuth * using other readme instead * Fix sftp docker build (#255) * fix express dependency and docker build * remove extra lines from dockerfile * update package lock --------- Co-authored-by: Clinton Werth <clinton@Clintons-MacBook-Pro.local> * 1390 - SFTP Plugin Password Encryption (#258) * first attempt * working encryption * finished * removed unnecesary import * testing updating magerc * hard-coding version * salt not found fix * salt not found fix 2 * forgot about types version * Arcgis Features randomly not transferring properly (#257) * store * initial commit * fix event updates * update promises * init fix * Small changes * add comment * Add linting to Arcgis plugin - Service (#240) * Convert httpClient calls to @esri/arcgis-rest-request with ArcGISIdentityManager for authentication * Fix addFields and deleteFields * Fixed outFields and returnGeometry for query generation * [service] prepend form name to all event form fields for clarity and to avoid ESRI column name conflicts * [service] Fix check to determine if an observation sync to ESRI is a create or update * [service] OAuth refresh token flow in work * [service] Add IdentityManager to ObservationSender construction * [service] Remove httpClient * [service] fix FeatureQuerier response from request * [service] Refactor ArcGISIdentityManager management * draft changes * [service] ArcGIS field names are lowercase, account for this when adding/removing fields * Undo revert of FeatureQuerier * [service] Remove HttpClient.ts, no longer used * [service] updateConfig inner async methods await before we query * [server] Attribute sync fix upon adding feature server * [web/service] API update to include feature service authentication status * [service] fix regression in token, username/password validation req parameter parsing * [service] Clean up TODO comments * [service] form field mapping need to account for form name and field name to avoid conflicts * Reduce response logging that may cause confusion * [service] include event forms in detecting config changes * Merge develop * [service] sync configured events instead of checking changes of all events. Store event ids instead of names * [server] Fix query syntax error * fix failing errors for observations * [service] fix event deletion and firstRun logic * fix issues with updates * fix deletion issue * init * add lint to services * fix required field issue * update arcgis read me --------- Co-authored-by: Rick Saccoccia <richard.saccoccia@caci.com> Co-authored-by: William Newman <3382274+newmanw@users.noreply.github.com> Co-authored-by: Clinton Werth <clinton@Clintons-MacBook-Pro.local> * ArcGIS duplicate features sent to the feature service (#259) * Fixes issue where deleted/archived observations were consistently 'deleted' from the feature layer. Other code clean up. * Updated github actions to build docker container on feature branches. Will still only deploy to dev/test on develop/test branch. --------- Co-authored-by: Clinton Werth <clinton@Clintons-MacBook-Pro.local> * Ensure enabled/disabled works after arc plugin is initialized (#260) * store * initial commit * fix event updates * update promises * init fix * Small changes * add comment * store * initial commit * update docker and aws build * fix processor error * fix config issue --------- Co-authored-by: Clinton Werth <clinton@Clintons-MacBook-Pro.local> * fix feature layer delete and error message after put (#256) Co-authored-by: Clinton Werth <clinton@Clintons-MacBook-Pro.local> * Release of 6.3.0-beta.8 for Server, Web and Core(#261) Co-authored-by: Clinton Werth <clinton@Clintons-MacBook-Pro.local> * Arc sftp beta release (#262) * Set beta release for SFTP and Arc plugins * fix arc web build --------- Co-authored-by: Clinton Werth <clinton@Clintons-MacBook-Pro.local> * fix sftp release yaml (#263) Co-authored-by: Clinton Werth <clinton@Clintons-MacBook-Pro.local> * Fix sftp release work flow (#264) * fix sftp release yaml * update package json files for proper package versions --------- Co-authored-by: Clinton Werth <clinton@Clintons-MacBook-Pro.local> * update docker files (#266) Co-authored-by: Clinton Werth <clinton@Clintons-MacBook-Pro.local> --------- Co-authored-by: Kevin Gilland <kgilland@caci.com> Co-authored-by: Robert St. John <restjohn@users.noreply.github.com> Co-authored-by: kimura-developer <136853071+kimura-developer@users.noreply.github.com> Co-authored-by: Jim Cheng <33436619+jimcheng256@users.noreply.github.com> Co-authored-by: Mike Finnessy <mfinnessy@caci.com> Co-authored-by: Skosche3 <richard.saccoccia@gmail.com> Co-authored-by: Rick Saccoccia <richard.saccoccia@caci.com> Co-authored-by: Billy Newman <newmanw10@gmail.com> Co-authored-by: William Newman <3382274+newmanw@users.noreply.github.com> Co-authored-by: Ryan <46985385+ryanslatten@users.noreply.github.com> Co-authored-by: Jordanafoster6 <Jordanafoster6@users.noreply.github.com> Co-authored-by: kbrownomni <katherine.brown@omnifederal.com> Co-authored-by: Katherine Brown <katherinebrown@Katherines-MBP.attlocal.net> Co-authored-by: Katherine Brown <katherinebrown@Katherines-MacBook-Pro.local> Co-authored-by: Jordan Foster <jordanafoster6@gmail.com> Co-authored-by: Ryan Slatten <ryanslatten@vt.edu> Co-authored-by: Clinton Werth <clinton@Clintons-MacBook-Pro.local> Co-authored-by: Ryan Carpenter <ryan.carpenter@omnifederal.com> Co-authored-by: Dan Benner <dan@vegafederal.com> Co-authored-by: James McDougall <james.mcdougall@omnifederal.com>
Error: Cannot find module @rollup/rollup-linux-x64-gnu. npm has a bug related to optional dependencies (npm/cli#4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
Had the same issue with an optional dependency and this solved it for me: rm -rf node_modules package-lock.json npm cache clean --force npm install |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
I'm working on a team that utilizes a mix of x64-based and m1-based macs, and has CI build processes that uses musl. We're seeing that
npm
is skipping platform-specific optional dependencies for packages such as@swc/core
as a result of thepackage-lock.json
file being generated without all of them included. In our case, this then causes linting to throw an exception, because one of our eslint plugins depends on @swc, which depends on having the platform specific @swc package also installed.There seems to be at least two stages of cause to this. Firstly, when installing
@swc/core
from a clean slate working directorynpm
generates apackage-lock.json
with all of the optional dependencies for@swc/core
listed:And it only installs the platform specific package:
If I then remove my
package-lock.json
, leave mynode_modules
directory as-is, and then reinstall, I get:That is, it then generates a package-lock.json with only the platform-specific dependency that was installed on this machine, and not with the other optional dependencies that should also be listed.
If you delete both
node_modules
ANDpackage-lock.json
, and then re-runnpm install
, it generates the correct lockfile with all of those optional dependencies listed.The problem is that then, If the
package-lock.json
with the missing optional platform-specific dependencies gets checked into git and an x64 user pulls it down, or vice-versa,npm
fails to detect that your platform's optional dependencies are missing in the lockfile and just silently skips installing the platform-specific dependency. For example, when I've got a package-lock.json that only contains the x64 @swc package because of the above problem (generated by my coworker on his x64 machine):And I then install:
You can see that it fails to install the arm64 dependency or warn me in any way that the
package-lock.json
is missing my platform's dependency.So yeah, two problems:
Expected Behavior
npm
should preserve the full set of platform-specific optional deps for a package like @swc when rebuildingpackage-lock.json
from an existingnode_modules
treenpm install
should warn if thepackage-lock.json
becomes inconsistent because of the first caseSteps To Reproduce
See above.
Environment
The text was updated successfully, but these errors were encountered: