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

node: Update package-lock.json and run workflows on its change #343

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

lucas-koehler
Copy link
Contributor

  • Update package-lock.json to get latest dependencies
  • Update node workflows to run on package-lock changes

Hopefully fixes #340

@jfaltermeier
Copy link
Contributor

I get an error when the workspace build the testing-page:

Error: Cannot find module 'react-dev-utils/crossSpawn'
Require stack:
- /home/johannes/Git/theia-cloud/node/testing-page/node_modules/react-scripts/bin/react-scripts.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
    at Module._load (node:internal/modules/cjs/loader:985:27)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (/home/johannes/Git/theia-cloud/node/testing-page/node_modules/react-scripts/bin/react-scripts.js:18:15)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/johannes/Git/theia-cloud/node/testing-page/node_modules/react-scripts/bin/react-scripts.js'
  ]
}

Node.js v20.10.0
npm ERR! Lifecycle script `build` failed with error: 
npm ERR! Error: command failed 
npm ERR!   in workspace: [email protected] 
npm ERR!   at location: /home/johannes/Git/theia-cloud/node/testing-page 

I was doing

cd node
git clean -xfd
npm ci
npm run build

- Update package-lock.json to get latest dependencies
- Update node workflows to run on package-lock changes
@lucas-koehler
Copy link
Contributor Author

@jfaltermeier Thanks for trying this. I could reproduce the issue. After cleaning the node folder with git clean -dxf and then regenerating the package-lock.json, the build now worked for me.

Apparently, npm install behaves differently if there are existing nested node_modules folders.

Copy link
Contributor

@jfaltermeier jfaltermeier left a comment

Choose a reason for hiding this comment

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

Thanks, lgtm!

@lucas-koehler lucas-koehler merged commit 2d811d5 into main Aug 22, 2024
7 checks passed
@lucas-koehler lucas-koehler deleted the lk/node-deps-update branch August 22, 2024 09:23
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.

Error building landing-page docker image
2 participants