-
Notifications
You must be signed in to change notification settings - Fork 28
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
Update package.json versions (Node / React / node-sass) #625
Comments
Experiment 1. Replacing node-sass with sass (a pure js version) but this will likely require a newer version of react-scripts. Simply removing and adding sass loader and sass was insufficient.
but this causes
Conclusion: Return to sass after we can update node and maybe react. Experiment 2. I tried starting with a package.json from a new react 18 project and modern version of node (16) then incrementally adding each missing dependency (yarn add XYZ, yarn build...). Lessons learned:
I don't knowhow to add the shims back in that apparently we had in the current production build; The new project did not have a webpack.config.js. Adding items to package.json or reducing the adm-zip to "0.4.7 did not help. Though using the earl version complained about missing "fs" instead of 'path' This may be relevant Conclusion: Let's put aside upgrading to react18 until later. Experiment 3 - Remove yarn.lock (then
Conclusion: Looks like we should be more specific on the version of react-use-set in package.json, as a minor version bump currently breaks the build.[Update: Nope original version does not even use this dependency] Experiment 4 - Update the react-scripts to 4.0.3
|
|
@HanBoyou Please can you take take a fresh copy of staging branch from github and take a look at it? (i.e. reinstall all dependences ; I'd like a PR that passes lint checks and appears to work). You can run the lint check locally with "yarn lint -q" I believe. In the worst case, we can roll-back your latest PR... but I'd rather not do that... |
Working on this |
Closing this for now since we
React Update is likely possible and it's being tracked here: #818 Moving dvaJS will be slightly more complicated, and it's being tracked here: #768 |
We're currently on node 14 and older versions of react, react build scripts etc. We need to update to more modern js packages. Any help in moving any/all packages would be appreciated and most useful.
https://github.com/classtranscribe/FrontEnd/blob/staging/package.json
https://github.com/classtranscribe/FrontEnd/blob/staging/yarn.lock
We're build using yarn on node version 14 i.e.
nvm install 14
nvm use 14
npm install --global yarn
yarn install
yarn build
should be all you need.
Notes so far based on what I tried-
We're currently use node-sass (but should probably move over to sass, which is a pure js solution) which is dependent on the version of node-
https://stackoverflow.com/questions/45801457/node-js-python-not-found-exception-due-to-node-sass-and-node-gyp
Later versions of adm-zip might need a shim. Early version of node/react include some shims for fs/path ; so just upgrading to latest version of node seemed to break it.
I expect dva can be removed/replaced.
The text was updated successfully, but these errors were encountered: