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

Bump node.js from 13.6 to 14.16 #121

Merged
merged 3 commits into from
Mar 25, 2021
Merged

Conversation

gukoff
Copy link
Contributor

@gukoff gukoff commented Mar 17, 2021

📑 Summary

Currently building the docker image fails with the following error:

$ docker build -t mermaid-editor github.com/mermaid-js/mermaid-live-editor
 
...

=> [mermaid-live-editor-builder 4/5] RUN yarn install                                                                                                                                  25.2s= => ERROR [mermaid-live-editor-builder 5/5] RUN yarn build                                                                                                                               0.8s
------                                                                                                                                                                                         > [mermaid-live-editor-builder 5/5] RUN yarn build:
#9 0.399 yarn run v1.21.1
#9 0.432 $ webpack build
#9 0.748 internal/modules/cjs/loader.js:628
#9 0.748   throw e;
#9 0.748   ^
#9 0.748
#9 0.748 Error: No valid exports main found for '/home/node_modules/colorette'
#9 0.748     at resolveExportsTarget (internal/modules/cjs/loader.js:625:9)
#9 0.748     at applyExports (internal/modules/cjs/loader.js:502:14)
#9 0.748     at resolveExports (internal/modules/cjs/loader.js:551:12)
#9 0.748     at Function.Module._findPath (internal/modules/cjs/loader.js:657:22)
#9 0.748     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:960:27)
#9 0.748     at Function.Module._load (internal/modules/cjs/loader.js:855:27)
#9 0.748     at Module.require (internal/modules/cjs/loader.js:1033:19)
#9 0.748     at require (/home/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
#9 0.748     at Object.<anonymous> (/home/node_modules/webpack-cli/lib/webpack-cli.js:10:66)
#9 0.748     at Module._compile (/home/node_modules/v8-compile-cache/v8-compile-cache.js:192:30) {
#9 0.748   code: 'MODULE_NOT_FOUND'
#9 0.748 }
#9 0.763 error Command failed with exit code 1.
#9 0.763 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
executor failed running [/bin/sh -c yarn build]: exit code: 1

This is because colorette doesn't work with Node.js 13: jorgebucaran/colorette#46

📏 Design Decisions

I bumped the node.js version to the latest.

Any node.js other than 13 would work. If there's a reason to not use the latest version, we can use 14.16.

📋 Tasks

Make sure you

  • 📖 have read the contribution guidelines
  • 💻 have added unit/e2e tests (if appropriate)
  • 🔖 targeted master branch

Currently building the docker image fails with the following error:

```
 => [mermaid-live-editor-builder 4/5] RUN yarn install                                                                                                                                  25.2s= => ERROR [mermaid-live-editor-builder 5/5] RUN yarn build                                                                                                                               0.8s
------                                                                                                                                                                                         > [mermaid-live-editor-builder 5/5] RUN yarn build:
mermaid-js#9 0.399 yarn run v1.21.1
mermaid-js#9 0.432 $ webpack build
mermaid-js#9 0.748 internal/modules/cjs/loader.js:628
mermaid-js#9 0.748   throw e;
mermaid-js#9 0.748   ^
mermaid-js#9 0.748
mermaid-js#9 0.748 Error: No valid exports main found for '/home/node_modules/colorette'
mermaid-js#9 0.748     at resolveExportsTarget (internal/modules/cjs/loader.js:625:9)
mermaid-js#9 0.748     at applyExports (internal/modules/cjs/loader.js:502:14)
mermaid-js#9 0.748     at resolveExports (internal/modules/cjs/loader.js:551:12)
mermaid-js#9 0.748     at Function.Module._findPath (internal/modules/cjs/loader.js:657:22)
mermaid-js#9 0.748     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:960:27)
mermaid-js#9 0.748     at Function.Module._load (internal/modules/cjs/loader.js:855:27)
mermaid-js#9 0.748     at Module.require (internal/modules/cjs/loader.js:1033:19)
mermaid-js#9 0.748     at require (/home/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
mermaid-js#9 0.748     at Object.<anonymous> (/home/node_modules/webpack-cli/lib/webpack-cli.js:10:66)
mermaid-js#9 0.748     at Module._compile (/home/node_modules/v8-compile-cache/v8-compile-cache.js:192:30) {
mermaid-js#9 0.748   code: 'MODULE_NOT_FOUND'
mermaid-js#9 0.748 }
mermaid-js#9 0.763 error Command failed with exit code 1.
mermaid-js#9 0.763 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
executor failed running [/bin/sh -c yarn build]: exit code: 1
```

This is because colorette doesn't work with Node.js 13: jorgebucaran/colorette#46

Any node.js other than 13 would work. If there's a reason to not use the latest version, we can change it to 14.16.
@sidharthv96
Copy link
Member

I think going with LTS (v14) will be a better choice as we are not using any v15 specific features.

@gukoff gukoff changed the title Bump node.js from 13.6 to 15.11 Bump node.js from 13.6 to 14.16 Mar 25, 2021
@gukoff
Copy link
Contributor Author

gukoff commented Mar 25, 2021

Changed, verified it builds and runs.

@sidharthv96
Copy link
Member

Awesome!
Thanks for the PR @gukoff

@sidharthv96 sidharthv96 merged commit cbdf28c into mermaid-js:master Mar 25, 2021
@gukoff gukoff deleted the patch-1 branch April 7, 2021 11:16
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