redwoodjs / repeaterdev-js

Official Javascript library for Repeater.dev
MIT License
29 stars 1 forks source link

Cannot find module error #5

Closed leighhalliday closed 4 years ago

leighhalliday commented 4 years ago

Hey! I was trying to put together a tutorial on YouTube for repeater.dev, but am running into an error using it with Next.js.

The repository is here: https://github.com/leighhalliday/background-job-demo/blob/master/pages/api/hello.ts

Error: Cannot find module '@babel/runtime-corejs3/helpers/interopRequireDefault'
Require stack:
- /Users/leighhalliday/playing/background-jobs/node_modules/repeaterdev-js/dist/repeater.js
- /Users/leighhalliday/playing/background-jobs/.next/server/pages/api/hello.js
- /Users/leighhalliday/playing/background-jobs/node_modules/next/dist/next-server/server/next-server.js
- /Users/leighhalliday/playing/background-jobs/node_modules/next/dist/server/next.js
- /Users/leighhalliday/playing/background-jobs/node_modules/next/dist/server/lib/start-server.js
- /Users/leighhalliday/playing/background-jobs/node_modules/next/dist/cli/next-dev.js
- /Users/leighhalliday/playing/background-jobs/node_modules/next/dist/bin/next
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/Users/leighhalliday/playing/background-jobs/node_modules/repeaterdev-js/dist/repeater.js:3:30)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/leighhalliday/playing/background-jobs/node_modules/repeaterdev-js/dist/repeater.js',
    '/Users/leighhalliday/playing/background-jobs/.next/server/pages/api/hello.js',
    '/Users/leighhalliday/playing/background-jobs/node_modules/next/dist/next-server/server/next-server.js',
    '/Users/leighhalliday/playing/background-jobs/node_modules/next/dist/server/next.js',
    '/Users/leighhalliday/playing/background-jobs/node_modules/next/dist/server/lib/start-server.js',
    '/Users/leighhalliday/playing/background-jobs/node_modules/next/dist/cli/next-dev.js',
    '/Users/leighhalliday/playing/background-jobs/node_modules/next/dist/bin/next'
  ]
}
cannikin commented 4 years ago

Hmmmm sorry about that, I haven't had that problem, but I've been using Repeater with Redwood so maybe something about that config is masking the problem. I'm talking to our resident babel config expert and I'll hopefully have an update early in the week!

leighhalliday commented 4 years ago

@cannikin Thanks Rob... maybe the solution is for me to try this with Redwood instead :D I've been meaning to learn it anyway!

cannikin commented 4 years ago

Okay @leighhalliday can you try now with 0.6.0? I had to move one of the babel packages to core dependencies.

cannikin commented 4 years ago

I'm closing this for now but I'll reopen if you're still having a problem!