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

Error: No valid exports main found #46

Closed
vsehgal1 opened this issue Jul 5, 2020 · 6 comments
Closed

Error: No valid exports main found #46

vsehgal1 opened this issue Jul 5, 2020 · 6 comments

Comments

@vsehgal1
Copy link

vsehgal1 commented Jul 5, 2020

OS: Ubuntu: 18.04
Node Version: 13.6.0
Colorette Version: 1.2.1

After the version update anytime I try to npm start I face the following issue:
Error: No valid exports main found for './node_modules/colorette'

Am I missing something?
Thank you

@vsehgal1
Copy link
Author

vsehgal1 commented Jul 5, 2020

Works when I downgrade to 1.2.0

@twalton83
Copy link

Also seeing this issue when I use create-react-app.

@ok200paul
Copy link

https://twitter.com/jorgebucaran/status/1279802683264626688 - update to node >=13.7.0 :)

@noxxxxxious
Copy link

noxxxxxious commented Jul 6, 2020

https://twitter.com/jorgebucaran/status/1279802683264626688 - update to node >=13.7.0 :)

Updating Node fixed this for me.
nvm install latest put me on 14.5.0 and my vue dev server launched with no problem this time.

Thanks!

@twalton83
Copy link

https://twitter.com/jorgebucaran/status/1279802683264626688 - update to node >=13.7.0 :)

Thanks for the heads up! Works great.

@jorgebucaran
Copy link
Owner

jorgebucaran commented Jul 6, 2020

@vsehgal1 Glad you figured it out @/all. Some versions in the Node 13.x range have buggy ES module support or need --experimental-modules in the command line, so I suggest you upgrade to Node >=13.7. 👋

gukoff added a commit to gukoff/mermaid-live-editor that referenced this issue Mar 17, 2021
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.
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

No branches or pull requests

5 participants