Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ncc run with -e flag not working #154

Closed
fmiras opened this issue Dec 14, 2018 · 3 comments
Closed

ncc run with -e flag not working #154

fmiras opened this issue Dec 14, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@fmiras
Copy link
Contributor

fmiras commented Dec 14, 2018

-e flag is currently working only in ncc build and not in ncc run

How to test:

// index.js
const puppeteer = require('puppeteer')
console.log('it works')
ncc run index.js -e puppeteer # -> "Error: Cannot find module 'puppeteer'"
ncc build index.js -e puppeteer -o dist && node dist # "it works"
@rauchg
Copy link
Member

rauchg commented Dec 14, 2018

😨

@guybedford
Copy link
Contributor

The reason for this would be the lack of a node_modules in the temporary directory that the app is run against.

We could symlink the node_modules there to the local one.

More consistent might be to symlink just node_modules/[external] for each known external to ensure nothing is brought through that shouldn't be.

@rauchg rauchg added the bug Something isn't working label Dec 14, 2018
@guybedford
Copy link
Contributor

Fixed in #218.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants