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

build: regenerate package lock due to build errors #9774

Merged
merged 2 commits into from
Jul 15, 2024
Merged

Conversation

Elijbet
Copy link
Contributor

@Elijbet Elijbet commented Jul 13, 2024

Summary

Re-generate package-lock.json to resolve a build error on osx machines.

Error: Cannot find module '@nx/nx-darwin-arm64'
Require stack:
- /Users/eli97736/Documents/calcite-components/node_modules/nx/src/native/index.js
- /Users/el1i97736/Documents/calcite-components/node_modules/nx/src/hasher/node-task-hasher-impl.js
- /Users/e1i97736/Documents/calcite-components/node_modules/nx/src/hasher/task-hasher.js
- /Users/e1i97736/Documents/calcite-components/node_modules/nx/src/hasher/hash-task.js
- /Users/e1i97736/Documents/calcite-components/node_modules/nx/src/tasks-runner/run-command.js
- /Users/e1i97736/Documents/calcite-components/node_modules/nx/srce/nx-cloud/utilities/get-cloud-options.js
- /Users/e1i97736/Documents/calcite-components/node_modules/nx/bin/post-install.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
at Function.resolve (node:internal/modules/helpers:190:19)
at Module._load (/Users/el1i97736/Documents/calcite-components/node_modules/nx/src/native/index.js:53:36)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/Users/eli97736/Documents/calcite-components/node_modules/nx/src/native/native-bindings.js:135:29)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions.js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/e1i197736/Documents/calcite-components/node_modules/nx/srce/native/index.js',
'/Users/e1i97736/Documents/calcite-components/node_modules/nx/srce/hasher/node-task-hasher-impl.js',
'/Users/e1i97736/Documents/calcite-components/node_modules/nx/srce/hasher/task-hasher.js',
'/Users/e1i97736/Documents/calcite-components/node_modules/nx/src/hasher/hash-task.js',
'/Users/e1i197736/Documents/calcite-components/node_modules/nx/src/tasks-runner/run-command.js',
'/Users/e1i97736/Documents/calcite-components/node_modules/nx/src/nx-cloud/utilities/get-cloud-options.js',
'/Users/e1i97736/Documents/calcite-components/node_modules/nx/bin/post-install.js'
]
}

@jcfranco
Copy link
Member

@Elijbet I noticed this aims to update the lockfile. Could you please share the reason for this?

@Elijbet
Copy link
Contributor Author

Elijbet commented Jul 14, 2024

@Elijbet I noticed this aims to update the lockfile. Could you please share the reason for this?

I kept running an error when trying to npm install after pulling the latest to dev. After troubleshooting with Ben he asked me to open a PR if the re-install made changes to package-lock so other OSX ppl don't hit the issue. @benelan

@benelan benelan changed the title Package-lock updates build: regenerate package lock due to build errors Jul 14, 2024
@benelan benelan marked this pull request as ready for review July 14, 2024 23:30
Copy link
Member

@benelan benelan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jcfranco Yeah I requested this PR, as Eliza mentioned. I updated the title and body with the relevant info.

* origin/dev:
  build(deps): update dependency @floating-ui/dom to v1.6.7 (#9766)
@github-actions github-actions bot added the chore Issues with changes that don't modify src or test files. label Jul 15, 2024
@benelan
Copy link
Member

benelan commented Jul 15, 2024

@Elijbet there were merge conflicts so I regenereted the package-lock again and pushed to this branch. Before merging, can you run the following to confirm the build issues aren't reintroduced:

git clean -fdx && npm install && npm run build

@jcfranco
Copy link
Member

Awesome. Thank you both for the context and the PR! ✨💪✨

@Elijbet
Copy link
Contributor Author

Elijbet commented Jul 15, 2024

@Elijbet there were merge conflicts so I regenereted the package-lock again and pushed to this branch. Before merging, can you run the following to confirm the build issues aren't reintroduced:

git clean -fdx && npm install && npm run build

Looks good. Merging.

@Elijbet Elijbet added the skip visual snapshots Pull requests that do not need visual regression testing. label Jul 15, 2024
@Elijbet Elijbet merged commit 8daa408 into dev Jul 15, 2024
11 checks passed
@Elijbet Elijbet deleted the package-lock-changes branch July 15, 2024 05:02
@github-actions github-actions bot added this to the 2024-07-30 - Jul Release milestone Jul 15, 2024
benelan added a commit that referenced this pull request Jul 15, 2024
…-to-monorepo

* origin/dev: (206 commits)
  fix(tile): center align slot's text when alignment is equal to center (#9773)
  build: regenerate package lock due to build errors (#9774)
  build(deps): update dependency @floating-ui/dom to v1.6.7 (#9766)
  chore(common-tests): add themed test helper (#9763)
  chore: release next
  fix(shell): update shell to correctly position calcite shell panel at shell's bottom (#9748)
  chore: release next
  fix(tile): center align contentTop and contentBottom slots when alignment prop equals "center" (#9732)
  chore: release next
  chore(tree-item): fix mutable warning `indeterminate` prop (#9760)
  fix(panel, flow-item): fix footer-padding CSS prop regression (#9757)
  build(deps): update angular monorepo to v18 (major) (#9587)
  chore: release next
  Chore: remove component usage files (#9052)
  fix(input-number): restore decimal input mode default (#9741)
  test(panel, flow-item): add scale control to simple stories (#9747)
  chore: release next
  feat(panel, flow-item): add scale property (#9730)
  chore: release next
  fix(segmented-control): Make check state update correctly (#9733)
  ...
benelan added a commit that referenced this pull request Jul 15, 2024
**Related Issue:** #9774

## Summary

Revert the package-lock.json changes in the above PR due to new errors:

```
calcite-design-system/dev/packages/calcite-components/support/generateT9nTypes.ts:1
import globby from "globby";
       ^

SyntaxError: The requested module 'globby' does not provide an export named 'default'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:134:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:217:5)
    at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
    at async loadESM (node:internal/process/esm_loader:28:7)
    at async handleMainPromise (node:internal/modules/run_main:113:12)

Node.js v20.12.1
npm ERR! Lifecycle script `util:generate-t9n-types` failed with error:
npm ERR! Error: command failed
npm ERR!   in workspace: @esri/[email protected]
npm ERR! Lifecycle script `util:prep-build-reqs` failed with error:
npm ERR! Error: command failed
npm ERR!   in workspace: @esri/[email protected]
npm ERR! Lifecycle script `build` failed with error:
npm ERR! Error: command failed
npm ERR!   in workspace: @esri/[email protected]
```
benelan added a commit that referenced this pull request Jul 16, 2024
**Related Issue:** #9774, #9779, #9790

## Summary

One more round of bug pong

The globby one is higher priority since it impacts the CI too, compared
to only OSX machines. I'll try to find a solution to the OSX errors that
doesn't cause globby issues.
benelan added a commit that referenced this pull request Jul 19, 2024
**Related Issue:** #9774, #9779, #9790, #9797

## Summary

Resolve build errors related to Nx Native Modules using a solution from
lerna/lerna#3815 (comment)

Nx documented additional troubleshooting steps for this common error:
https://nx.dev/troubleshooting/troubleshoot-nx-install-issues
calcite-admin pushed a commit that referenced this pull request Jul 30, 2024
## Summary

Re-generate `package-lock.json` to resolve a build error on osx
machines.

```
Error: Cannot find module '@nx/nx-darwin-arm64'
Require stack:
- /Users/eli97736/Documents/calcite-components/node_modules/nx/src/native/index.js
- /Users/el1i97736/Documents/calcite-components/node_modules/nx/src/hasher/node-task-hasher-impl.js
- /Users/e1i97736/Documents/calcite-components/node_modules/nx/src/hasher/task-hasher.js
- /Users/e1i97736/Documents/calcite-components/node_modules/nx/src/hasher/hash-task.js
- /Users/e1i97736/Documents/calcite-components/node_modules/nx/src/tasks-runner/run-command.js
- /Users/e1i97736/Documents/calcite-components/node_modules/nx/srce/nx-cloud/utilities/get-cloud-options.js
- /Users/e1i97736/Documents/calcite-components/node_modules/nx/bin/post-install.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
at Function.resolve (node:internal/modules/helpers:190:19)
at Module._load (/Users/el1i97736/Documents/calcite-components/node_modules/nx/src/native/index.js:53:36)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/Users/eli97736/Documents/calcite-components/node_modules/nx/src/native/native-bindings.js:135:29)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions.js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/e1i197736/Documents/calcite-components/node_modules/nx/srce/native/index.js',
'/Users/e1i97736/Documents/calcite-components/node_modules/nx/srce/hasher/node-task-hasher-impl.js',
'/Users/e1i97736/Documents/calcite-components/node_modules/nx/srce/hasher/task-hasher.js',
'/Users/e1i97736/Documents/calcite-components/node_modules/nx/src/hasher/hash-task.js',
'/Users/e1i197736/Documents/calcite-components/node_modules/nx/src/tasks-runner/run-command.js',
'/Users/e1i97736/Documents/calcite-components/node_modules/nx/src/nx-cloud/utilities/get-cloud-options.js',
'/Users/e1i97736/Documents/calcite-components/node_modules/nx/bin/post-install.js'
]
}
```

Co-authored-by: Ben Elan <[email protected]>
calcite-admin pushed a commit that referenced this pull request Jul 30, 2024
**Related Issue:** #9774

## Summary

Revert the package-lock.json changes in the above PR due to new errors:

```
calcite-design-system/dev/packages/calcite-components/support/generateT9nTypes.ts:1
import globby from "globby";
       ^

SyntaxError: The requested module 'globby' does not provide an export named 'default'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:134:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:217:5)
    at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
    at async loadESM (node:internal/process/esm_loader:28:7)
    at async handleMainPromise (node:internal/modules/run_main:113:12)

Node.js v20.12.1
npm ERR! Lifecycle script `util:generate-t9n-types` failed with error:
npm ERR! Error: command failed
npm ERR!   in workspace: @esri/[email protected]
npm ERR! Lifecycle script `util:prep-build-reqs` failed with error:
npm ERR! Error: command failed
npm ERR!   in workspace: @esri/[email protected]
npm ERR! Lifecycle script `build` failed with error:
npm ERR! Error: command failed
npm ERR!   in workspace: @esri/[email protected]
```
calcite-admin pushed a commit that referenced this pull request Jul 30, 2024
**Related Issue:** #9774, #9779, #9790

## Summary

One more round of bug pong

The globby one is higher priority since it impacts the CI too, compared
to only OSX machines. I'll try to find a solution to the OSX errors that
doesn't cause globby issues.
calcite-admin pushed a commit that referenced this pull request Jul 30, 2024
**Related Issue:** #9774, #9779, #9790, #9797

## Summary

Resolve build errors related to Nx Native Modules using a solution from
lerna/lerna#3815 (comment)

Nx documented additional troubleshooting steps for this common error:
https://nx.dev/troubleshooting/troubleshoot-nx-install-issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issues with changes that don't modify src or test files. skip visual snapshots Pull requests that do not need visual regression testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants