Code Monkey home page Code Monkey logo

repro-nextjs-rxjs-pages-reproduction's Introduction

nextjs-rxjs

Reproduction of an issue in [email protected] and a CommonJS lib that exports an RxJS Observable.

How to reproduce

  1. Clone this repo, and run yarn install
  2. Run yarn build:all

You should see the following error:

[@nextjs-rxjs/app]: Process started
[@nextjs-rxjs/app]:    Linting and checking validity of types ...
[@nextjs-rxjs/app]:    Creating an optimized production build ...
[@nextjs-rxjs/app]:  โœ“ Compiled successfully
[@nextjs-rxjs/app]:    Collecting page data ...
[@nextjs-rxjs/app]: TypeError: a.Observable is not a constructor
[@nextjs-rxjs/app]:     at 9155 (/Users/oliverlaz/w/playground/nextjs-rxjs/packages/app/.next/server/pages/index.js:1:1126)
[@nextjs-rxjs/app]:     at __webpack_require__ (/Users/oliverlaz/w/playground/nextjs-rxjs/packages/app/.next/server/webpack-runtime.js:1:145)
[@nextjs-rxjs/app]:     at 5784 (/Users/oliverlaz/w/playground/nextjs-rxjs/packages/app/.next/server/pages/index.js:1:542)
[@nextjs-rxjs/app]:     at __webpack_require__ (/Users/oliverlaz/w/playground/nextjs-rxjs/packages/app/.next/server/webpack-runtime.js:1:145)
[@nextjs-rxjs/app]:     at __webpack_exec__ (/Users/oliverlaz/w/playground/nextjs-rxjs/packages/app/.next/server/pages/index.js:1:1436)
[@nextjs-rxjs/app]:     at /Users/oliverlaz/w/playground/nextjs-rxjs/packages/app/.next/server/pages/index.js:1:1479
[@nextjs-rxjs/app]:     at __webpack_require__.X (/Users/oliverlaz/w/playground/nextjs-rxjs/packages/app/.next/server/webpack-runtime.js:1:2141)
[@nextjs-rxjs/app]:     at /Users/oliverlaz/w/playground/nextjs-rxjs/packages/app/.next/server/pages/index.js:1:1449
[@nextjs-rxjs/app]:     at Object.<anonymous> (/Users/oliverlaz/w/playground/nextjs-rxjs/packages/app/.next/server/pages/index.js:1:1521)
[@nextjs-rxjs/app]:     at Module._compile (node:internal/modules/cjs/loader:1241:14)
[@nextjs-rxjs/app]: 
[@nextjs-rxjs/app]: > Build error occurred
[@nextjs-rxjs/app]: Error: Failed to collect page data for /
[@nextjs-rxjs/app]:     at /Users/oliverlaz/w/playground/nextjs-rxjs/node_modules/next/dist/build/utils.js:1171:15
[@nextjs-rxjs/app]:     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
[@nextjs-rxjs/app]:   type: 'Error'
[@nextjs-rxjs/app]: }

Expected behaviour

The build should succeed. The code compiles with next@~13.4:

  1. cd packages/app
  2. yarn add next@~13.4
  3. yarn build:all

The build succeeds.

repro-nextjs-rxjs-pages-reproduction's People

Contributors

oliverlaz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.