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

[Question] No valid exports main exception #16

Open
haganbt opened this issue Aug 5, 2020 · 2 comments
Open

[Question] No valid exports main exception #16

haganbt opened this issue Aug 5, 2020 · 2 comments

Comments

@haganbt
Copy link

haganbt commented Aug 5, 2020

Apologies if this is a very simple solution! Just starting out with gulp. When I run the how to use example, I get the following exception:

Error: No valid exports main found for '----/node_modules/terser'
    at resolveExportsTarget (internal/modules/cjs/loader.js:625:9)
    at applyExports (internal/modules/cjs/loader.js:502:14)
    at resolveExports (internal/modules/cjs/loader.js:551:12)
    at Function.Module._findPath (internal/modules/cjs/loader.js:657:22)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:960:27)
    at Function.Module._load (internal/modules/cjs/loader.js:855:27)
    at Module.require (internal/modules/cjs/loader.js:1033:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (------/node_modules/gulp-terser/lib/index.js:7:38)
    at Module._compile (internal/modules/cjs/loader.js:1144:30) {
  code: 'MODULE_NOT_FOUND'

Can anyone advise whats causing this?

node v13.6.0

@duan602728596
Copy link
Owner

Apologies if this is a very simple solution! Just starting out with gulp. When I run the how to use example, I get the following exception:

Error: No valid exports main found for '----/node_modules/terser'
    at resolveExportsTarget (internal/modules/cjs/loader.js:625:9)
    at applyExports (internal/modules/cjs/loader.js:502:14)
    at resolveExports (internal/modules/cjs/loader.js:551:12)
    at Function.Module._findPath (internal/modules/cjs/loader.js:657:22)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:960:27)
    at Function.Module._load (internal/modules/cjs/loader.js:855:27)
    at Module.require (internal/modules/cjs/loader.js:1033:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (------/node_modules/gulp-terser/lib/index.js:7:38)
    at Module._compile (internal/modules/cjs/loader.js:1144:30) {
  code: 'MODULE_NOT_FOUND'

Can anyone advise whats causing this?

node v13.6.0

Can you provide a demo for me to test?

@mckenfra
Copy link

I was seeing the same error, so I upgraded to node v14.12.0 and now it works.

BTW gulp-terser is great, thanks a lot 👍

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

3 participants