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

Cannot find module '.' #2978

Closed
joshleblanc opened this issue Sep 6, 2019 · 4 comments · Fixed by #2990
Closed

Cannot find module '.' #2978

joshleblanc opened this issue Sep 6, 2019 · 4 comments · Fixed by #2990
Labels
area: node triaged: bug Issue or PR has been reviewed by a maintainer and work is being tracked

Comments

@joshleblanc
Copy link

I'm fairly sure this is a now dev problem because I ran into this error converting a previously working endpoint to a now serverless function.

The build is failing on export * from '.', inside a library import.

I've created a MVCE here: https://github.com/HorizonShadow/now-error-mcve

Running now dev, and navigating to localhost:3000/api/test will produce

> Built @now/node@latest:api/test.ts [8s]
Cannot find module '.'
Did you forget to add it to "dependencies" in `package.json`?
@styfle styfle added area: node triaged: bug Issue or PR has been reviewed by a maintainer and work is being tracked labels Sep 9, 2019
@styfle
Copy link
Member

styfle commented Sep 9, 2019

Hi @HorizonShadow

Thanks for reporting this issue.

I've identified the root cause and created an issue here: vercel/nft#66

@capaj
Copy link

capaj commented Sep 16, 2019

@styfle when does this get out to an NPM release?

@styfle
Copy link
Member

styfle commented Sep 16, 2019

It's available in the canary channel today. npm i -g now@canary or if you are using builders you can change now.json to @now/node@canary.

It will be available soon on the stable channel.

@capaj
Copy link

capaj commented Sep 16, 2019

@styfle thanks. Canary works nicely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: node triaged: bug Issue or PR has been reviewed by a maintainer and work is being tracked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants