question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Module not found" error when compiling with rrule plugin

See original GitHub issue

Reported in https://fullcalendar.freshdesk.com/a/tickets/2127

Including the rrule plugin in the Angular example project using the example code results in “Module not found” error in compilation:

yarn run v1.22.5
$ ng build
0% compiling
Compiling @angular/core : es2015 as esm2015

Compiling @angular/common : es2015 as esm2015

Compiling @angular/platform-browser : es2015 as esm2015

Compiling @angular/platform-browser-dynamic : es2015 as esm2015

Compiling @fullcalendar/angular : es2015 as esm2015

ERROR in ./node_modules/@fullcalendar/rrule/main.js
Module not found: Error: Can't resolve 'rrule' in '/home/user/fullcalendar-example-projects/angular/node_modules/@fullcalendar/rrule'
resolve 'rrule' in '/home/user/fullcalendar-example-projects/angular/node_modules/@fullcalendar/rrule'
  Parsed request is a module
  using description file: /home/user/fullcalendar-example-projects/angular/node_modules/@fullcalendar/rrule/package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      looking for modules in /home/user/fullcalendar-example-projects/angular
        using description file: /home/user/fullcalendar-example-projects/angular/package.json (relative path: .)
          Field 'browser' doesn't contain a valid alias configuration
          using description file: /home/user/fullcalendar-example-projects/angular/package.json (relative path: ./rrule)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /home/user/fullcalendar-example-projects/angular/rrule doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /home/user/fullcalendar-example-projects/angular/rrule.ts doesn't exist
            .tsx
              Field 'browser' doesn't contain a valid alias configuration
              /home/user/fullcalendar-example-projects/angular/rrule.tsx doesn't exist
            .mjs
              Field 'browser' doesn't contain a valid alias configuration
              /home/user/fullcalendar-example-projects/angular/rrule.mjs doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /home/user/fullcalendar-example-projects/angular/rrule.js doesn't exist
            as directory
              /home/user/fullcalendar-example-projects/angular/rrule doesn't exist
      /home/user/fullcalendar-example-projects/angular/node_modules/@fullcalendar/rrule/node_modules doesn't exist or is not a directory
      /home/user/fullcalendar-example-projects/angular/node_modules/@fullcalendar/node_modules doesn't exist or is not a directory
      /home/user/fullcalendar-example-projects/angular/node_modules/node_modules doesn't exist or is not a directory
      /home/user/fullcalendar-example-projects/node_modules doesn't exist or is not a directory
      /home/user/node_modules doesn't exist or is not a directory
      /home/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
      looking for modules in /home/user/fullcalendar-example-projects/angular/node_modules
        using description file: /home/user/fullcalendar-example-projects/angular/package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
          using description file: /home/user/fullcalendar-example-projects/angular/node_modules/rrule/package.json (relative path: .)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /home/user/fullcalendar-example-projects/angular/node_modules/rrule is not a file
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /home/user/fullcalendar-example-projects/angular/node_modules/rrule.ts doesn't exist
            .tsx
              Field 'browser' doesn't contain a valid alias configuration
              /home/user/fullcalendar-example-projects/angular/node_modules/rrule.tsx doesn't exist
            .mjs
              Field 'browser' doesn't contain a valid alias configuration
              /home/user/fullcalendar-example-projects/angular/node_modules/rrule.mjs doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /home/user/fullcalendar-example-projects/angular/node_modules/rrule.js doesn't exist
            as directory
              existing directory
                use ./dist/esm/src/index.js from module in package.json
                  using description file: /home/user/fullcalendar-example-projects/angular/node_modules/rrule/package.json (relative path: .)
                    Field 'browser' doesn't contain a valid alias configuration
                    using description file: /home/user/fullcalendar-example-projects/angular/node_modules/rrule/package.json (relative path: ./dist/esm/src/index.js)
                      no extension
                        Field 'browser' doesn't contain a valid alias configuration
                        /home/user/fullcalendar-example-projects/angular/node_modules/rrule/dist/esm/src/index.js doesn't exist
                      .ts
                        Field 'browser' doesn't contain a valid alias configuration
                        /home/user/fullcalendar-example-projects/angular/node_modules/rrule/dist/esm/src/index.js.ts doesn't exist
                      .tsx
                        Field 'browser' doesn't contain a valid alias configuration
                        /home/user/fullcalendar-example-projects/angular/node_modules/rrule/dist/esm/src/index.js.tsx doesn't exist
                      .mjs
                        Field 'browser' doesn't contain a valid alias configuration
                        /home/user/fullcalendar-example-projects/angular/node_modules/rrule/dist/esm/src/index.js.mjs doesn't exist
                      .js
                        Field 'browser' doesn't contain a valid alias configuration
                        /home/user/fullcalendar-example-projects/angular/node_modules/rrule/dist/esm/src/index.js.js doesn't exist
                      as directory
                        /home/user/fullcalendar-example-projects/angular/node_modules/rrule/dist/esm/src/index.js doesn't exist
                use ./dist/es5/rrule.js from main in package.json
                  using description file: /home/user/fullcalendar-example-projects/angular/node_modules/rrule/package.json (relative path: .)
                    Field 'browser' doesn't contain a valid alias configuration
                    using description file: /home/user/fullcalendar-example-projects/angular/node_modules/rrule/package.json (relative path: ./dist/es5/rrule.js)
                      no extension
                        Field 'browser' doesn't contain a valid alias configuration
                        /home/user/fullcalendar-example-projects/angular/node_modules/rrule/dist/es5/rrule.js doesn't exist
                      .ts
                        Field 'browser' doesn't contain a valid alias configuration
                        /home/user/fullcalendar-example-projects/angular/node_modules/rrule/dist/es5/rrule.js.ts doesn't exist
                      .tsx
                        Field 'browser' doesn't contain a valid alias configuration
                        /home/user/fullcalendar-example-projects/angular/node_modules/rrule/dist/es5/rrule.js.tsx doesn't exist
                      .mjs
                        Field 'browser' doesn't contain a valid alias configuration
                        /home/user/fullcalendar-example-projects/angular/node_modules/rrule/dist/es5/rrule.js.mjs doesn't exist
                      .js
                        Field 'browser' doesn't contain a valid alias configuration
                        /home/user/fullcalendar-example-projects/angular/node_modules/rrule/dist/es5/rrule.js.js doesn't exist
                      as directory
                        /home/user/fullcalendar-example-projects/angular/node_modules/rrule/dist/es5/rrule.js doesn't exist
                using path: /home/user/fullcalendar-example-projects/angular/node_modules/rrule/index
                  using description file: /home/user/fullcalendar-example-projects/angular/node_modules/rrule/package.json (relative path: ./index)
                    no extension
                      Field 'browser' doesn't contain a valid alias configuration
                      /home/user/fullcalendar-example-projects/angular/node_modules/rrule/index doesn't exist
                    .ts
                      Field 'browser' doesn't contain a valid alias configuration
                      /home/user/fullcalendar-example-projects/angular/node_modules/rrule/index.ts doesn't exist
                    .tsx
                      Field 'browser' doesn't contain a valid alias configuration
                      /home/user/fullcalendar-example-projects/angular/node_modules/rrule/index.tsx doesn't exist
                    .mjs
                      Field 'browser' doesn't contain a valid alias configuration
                      /home/user/fullcalendar-example-projects/angular/node_modules/rrule/index.mjs doesn't exist
                    .js
                      Field 'browser' doesn't contain a valid alias configuration
                      /home/user/fullcalendar-example-projects/angular/node_modules/rrule/index.js doesn't exist

I also could not get it working in codesandbox, there I get ERROR TypeError: Cannot read property 'WEEKLY' of undefined:

https://codesandbox.io/s/suspicious-bush-1zose

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

19reactions
processedbeetscommented, Mar 3, 2021

What isn’t clear if you follow the docs on adding rrule for Full Calendar is on their NPM install instructions it makes no mention of first having to add the rrule package itself. However, the Script install instructions show rrule being pulled in from the cdn.

I added the rrule package separately: yarn add rrule which is what '@fullcalendar/rrule needs under the hood.

Hope that helps.

1reaction
acerixcommented, Sep 3, 2020

Actually, same error in Typescript, so it’s not Angular specific.

[./src/main.ts] 3.9 KiB {main} [built] [2 errors]
    + 19 hidden modules

ERROR in ./src/main.ts
Module not found: Error: Can't resolve '@fullcalendar/rrule' in '/home/user/fullcalendar-example-projects/typescript/src'
 @ ./src/main.ts 15:0-46 34:18-29

Read more comments on GitHub >

github_iconTop Results From Across the Web

import rrule plugin with fullcalendar v4 in React - Stack Overflow
All I want to do is show some recurring events in fullcalendar version 4 (so no JQuery dependency) and React. Any help would...
Read more >
rrule - npm
JavaScript library for working with recurrence rules for calendar dates. ... It is a partial port of the rrule module from the excellent...
Read more >
rrule-react - npm Package Health Analysis - Snyk
Looks like rrule-react is missing a security policy. You can connect your project's repository to Snyk to stay up to date on security...
Read more >
@fullcalendar/rrule | Yarn - Package Manager
Then, install the FullCalendar core package, the RRule plugin, and any other ... FIX: daygrid events sometimes not correctly positioned with Vue connectors ......
Read more >
Support recurring dates in calendar [#2820803] | Drupal.org
if the calendar module is not enabled I get a WSOD and this error: Fatal error: Trait 'Drupal\calendar\CalendarViewsTrait' not found in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found