Skip to content

Conversation

@bettysteger
Copy link
Contributor

@bettysteger bettysteger commented Oct 9, 2025

The production build is failing, fixing the error of the github Action: https://github.com/editor-js/attaches/actions/runs/18371256573/job/52334851671#step:5:1

@neSpecc
Copy link
Contributor

neSpecc commented Oct 9, 2025

@bettysteger please fill the description of the PR carefully.

@bettysteger
Copy link
Contributor Author

@bettysteger please fill the description of the PR carefully.

I updated the description, is this enough?

@neSpecc
Copy link
Contributor

neSpecc commented Oct 9, 2025

Your current description does not explain the problem, its reason and why your solution is the best choice.


The original issue caused by mismatched node.js version. This repo likely uses outdated node 16, but we don't fix the exact version of node and ubuntu in CI:

build:
    name: Production build
    runs-on: ubuntu-latest

and likely ubuntu-latest now have different version of node.

So please:

  1. Fix the exact version of ubuntu in CI
  2. Fix the exact major version of node in CI, package.json and .nvmrc
  3. Try using node 18 instead of 16. I think, the problem will gone there.
  4. Ideally, update node to 20 or 22 and update Webpack and other dependencies to match that version. This can be a little tricky because you'll need to update webpack config and something other.
  5. Your fix is ok as a temporary solution, but (1) and (2) should be done at least to prevent similar problems in a future.

@neSpecc
Copy link
Contributor

neSpecc commented Oct 15, 2025

@bettysteger hey, would you finish this fix?

@bettysteger
Copy link
Contributor Author

@bettysteger hey, would you finish this fix?

@neSpecc ah sorry i forgot, yes i can take a look today!

@bettysteger bettysteger changed the title fix production build fix production build and migrate from webpack to vite Oct 15, 2025
@bettysteger
Copy link
Contributor Author

bettysteger commented Oct 15, 2025

@neSpecc i hope that's ok: i migrated from webpack to vite and added the dev example.

i got the code mainly from editor-js/image and editor-js/checklist

(vite.config.js from checklist because no typescript used)

Copy link
Contributor

@neSpecc neSpecc left a comment

Choose a reason for hiding this comment

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

Seems ok, should be tested.

Also, please fix the supported Node version:

  • in package.json
  • in .nvmrc

package.json Outdated
"to-string-loader": "^1.2.0",
"webpack": "^4.29.6",
"webpack-cli": "^3.3.0"
"@codexteam/ajax": "^4.2.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

@codexteam/ajax looks like production dependency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i will move, but in https://github.com/editor-js/image/blob/master/package.json it is also under devDependencies

@bettysteger
Copy link
Contributor Author

Also, please fix the supported Node version:

  • in package.json
  • in .nvmrc

to which version?

there is no defined version in https://github.com/editor-js/image/blob/master/package.json and there is no .nvmrc in the ImageTool

@neSpecc
Copy link
Contributor

neSpecc commented Oct 15, 2025

there is no defined version

yep and that's the root of the problem you're trying to solve.

to which version?

Which version did you used while testing your changes? We need to lock the latest one supported by our dependencies

@bettysteger
Copy link
Contributor Author

@neSpecc i used v24.6.0 locally to test

@neSpecc
Copy link
Contributor

neSpecc commented Oct 15, 2025

@neSpecc i used v24.6.0 locally to test

so lock it if it is working ok

@neSpecc neSpecc merged commit f513251 into editor-js:master Oct 16, 2025
1 check passed
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.

2 participants