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

"Module not found" error when compiling with rrule plugin #5777

Closed
acerix opened this issue Sep 3, 2020 · 11 comments
Closed

"Module not found" error when compiling with rrule plugin #5777

acerix opened this issue Sep 3, 2020 · 11 comments

Comments

@acerix
Copy link
Member

acerix commented Sep 3, 2020

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

@acerix
Copy link
Member Author

acerix commented 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

@acerix acerix transferred this issue from fullcalendar/fullcalendar-angular Sep 3, 2020
@Jogai
Copy link

Jogai commented Sep 7, 2020

The rrule project messed something up, it works if you downgrade a version, see jkbrzt/rrule#417

Some even downgrade further to avoid other bugs, see: jkbrzt/rrule#209 (comment)

@arshaw
Copy link
Member

arshaw commented Sep 21, 2020

this seems like a problem with the 3rd party rrule package, which they claim to have fixed. is anyone able to verify that things are all good?

@meness
Copy link

meness commented Sep 21, 2020

this seems like a problem with the 3rd party rrule package, which they claim to have fixed. is anyone able to verify that things are all good?

I updated to the latest version and everything works fine. You can close this issue.

@arshaw
Copy link
Member

arshaw commented Sep 21, 2020

thanks

@arshaw arshaw closed this as completed Sep 21, 2020
@BlackBiM123
Copy link

Still have the same problem. @fullcalendar/vue": "^5.5.0", when compiling with "@fullcalendar/rrule": "^5.5.0", get Could not find module in path: 'rrule' relative to '/node_modules/@fullcalendar/rrule/main.js'. Any ways to win it?

@processedbeets
Copy link

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.

@spencersteiner
Copy link

@processedbeets Ah yes indeed! Thanks for posting this comment. The docs do say it's a "connector" for the rrule library, but I presumed that it would handle installing rrule as a dependency for me (didn't cross my mind to install it myself) as it didn't say outright that it needed to be installed separately.

That fixed it for me, thanks!

@processedbeets
Copy link

brilliant glad that worked!

@Laurenz1606
Copy link

still not working for me :(

@favger
Copy link

favger commented Aug 8, 2022

@processedbeets thanks. me too like this; npm install--save rrule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants