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: Can't resolve 'gsap/dist/gsap' #978

Open
ryo-ogata opened this issue Nov 16, 2020 · 2 comments
Open

Module not found: Error: Can't resolve 'gsap/dist/gsap' #978

ryo-ogata opened this issue Nov 16, 2020 · 2 comments

Comments

@ryo-ogata
Copy link

  • ScrollMagic 2.0.8
  • GSAP 2.1.3

npm run watch on Vue Project.

ryo@kusolingo3 src % npm run watch

> @ watch /Users/ryo/Documents/workspace/north/source/src
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

10% building 3/3 modules 0 active
webpack is watching the files…

98% after emitting SizeLimitsPlugin

 ERROR  Failed to compile with 1 errors                                                                                                                                                             16:04:26

This dependency was not found:

* gsap/dist/gsap in ./node_modules/imports-loader?define=>false!./node_modules/scrollmagic/scrollmagic/uncompressed/plugins/animation.gsap.js

To install it, you can run: npm install --save gsap/dist/gsap
                                                                  Asset        Size            Chunks             Chunk Names
                                                  /css/accounts-app.css     272 KiB  /js/accounts-app  [emitted]  /js/accounts-app
                                                       /css/cms-app.css     272 KiB  /js/accounts-app  [emitted]  /js/accounts-app
                                                     /css/front-app.css    7.68 KiB  /js/accounts-app  [emitted]  /js/accounts-app
                                                    /js/accounts-app.js    20.5 MiB  /js/accounts-app  [emitted]  /js/accounts-app
                                                         /js/cms-app.js    30.4 MiB       /js/cms-app  [emitted]  /js/cms-app
                                                       /js/front-app.js    26.8 MiB     /js/front-app  [emitted]  /js/front-app
         images/Icon_open-bookmark.svg?004a69025ee8140ab4aed10131a389fb   354 bytes                    [emitted]
             images/about_facebook.svg?8fc7a32c17ed81d71e1bf480e8302226   503 bytes                    [emitted]
              images/about_twitter.svg?d474aa68b9dfd3728876cd5f388d4b59    1.08 KiB                    [emitted]
                  images/app_apple.png?699d7e82cca1a849f5ff3f54063a77f5    3.85 KiB                    [emitted]
                 images/app_google.png?4a9862b1a2a20bdc2c8d7abc271b2081    6.77 KiB                    [emitted]
               images/arrow-bottom.svg?46df66c5037f27cf1a12d05f276deb97   388 bytes                    [emitted]
                 images/arrow-left.svg?66328827b5720d839428fa48b369d2c7   374 bytes                    [emitted]
                images/arrow-right.svg?268ce788e500024ca59addd4bee3fa9e   413 bytes                    [emitted]
         images/arrow-right__white.svg?7d300c5974911cdba458075d039991ca   410 bytes                    [emitted]
          images/arrow-swiper_next.svg?89c23343c192ca245f51591e9e5cc63f   306 bytes                    [emitted]
          images/arrow-swiper_prev.svg?213590670fd9d56b6eac4d22f828e9ee   327 bytes                    [emitted]
            images/arrow_left_gray.svg?973a38dafed94c8ee9c4f593c0ccb603   311 bytes                    [emitted]
           images/arrow_right_gray.svg?5b82a200c991d95b83b814feee2a2543   312 bytes                    [emitted]
                 images/banner_app.png?07802fd1515f8de0eb385beac2485e0e    4.83 KiB                    [emitted]
          images/bg_bookmark_popup.svg?e10c361a556b235830abf03455283cbe  1010 bytes                    [emitted]
     images/btn_sign_in_with_apple.png?26769c3f2c30eb90a86500185ccc0221    3.07 KiB                    [emitted]
     images/btn_sign_up_with_apple.png?c90e83adb4f96d270addeb0773e911a6    3.21 KiB                    [emitted]
              images/button-qrcode.png?1e030ff35a5507543a56a4b835aaf2ad   447 bytes                    [emitted]
                      images/check.svg?8969b442abfc4af1ce6f33f36466e305   418 bytes                    [emitted]
               images/dummy-camera.svg?09ddc413fdfa9395aa647a85030618ef    1.16 KiB                    [emitted]
               images/icon-map-pin.svg?5698c3bcddc309cb15ea634149533733   539 bytes                    [emitted]
                 images/icon_arrow.png?e07158f77971593b0fdb7884d6988cb6   242 bytes                    [emitted]
                 images/icon_close.svg?9392122cfd4ac56222a3b2744b079546   437 bytes                    [emitted]
              images/icon_comment1.png?811dc22cbecce303ae7c1d54b02e7c10   975 bytes                    [emitted]
               images/icon_dustbox.svg?522ddec9746a9be2c962d86f9878ab94   416 bytes                    [emitted]
           images/icon_event-entry.svg?7dd83fb57829f3686271f92354e8fe99   619 bytes                    [emitted]
         images/icon_external-link.png?1f75403a99bb087cfe0a92b1d64ed4e4   183 bytes                    [emitted]
              images/icon_facebook.png?02d15391bc2fd06c9cb54ac624a1a322   504 bytes                    [emitted]
                    images/icon_fb.svg?92fe8c8948e776f5611bde61928723ee   807 bytes                    [emitted]
              images/icon_fb_login.svg?3d4a87399599b62716227f9574198df9   472 bytes                    [emitted]
              images/icon_grid_off.svg?b417d3595033b11801f201cf30176ecf   441 bytes                    [emitted]
               images/icon_grid_on.svg?650d3dabb4f4672ca8b7f8df8fed6f50   440 bytes                    [emitted]
                 images/icon_heart.svg?a8a337a773b15f20ccf83d55af1c8f54   599 bytes                    [emitted]
              images/icon_heart_on.svg?a0b26ac6468acfbc4412cddd99757eb2   381 bytes                    [emitted]
       images/icon_inspiration_off.svg?faebb213b6dbc4d28ccb6568a0d8bee0    1.29 KiB                    [emitted]
        images/icon_inspiration_on.svg?d068299185ed5a67da66d27a21a6fd98    1.19 KiB                    [emitted]
             images/icon_instagram.png?b546ad19606a28dd973b9e1568531727    1.32 KiB                    [emitted]
                  images/icon_line.svg?521beade3690ebf0f0bdb6cf78fa9c31    1.59 KiB                    [emitted]
              images/icon_list_off.svg?e146bdb1990d3d94b2c82b7e17d81699   647 bytes                    [emitted]
               images/icon_list_on.svg?f19f2509084ed74829ccb28d344f3124   646 bytes                    [emitted]
                  images/icon_lock.svg?7f9f2a7b9d49aae2a13732a540e257b3   544 bytes                    [emitted]
                 images/icon_login.svg?02f6b5fdefcfbd6c1801d32a38a06a8a   634 bytes                    [emitted]
                  images/icon_more.png?015e84ee6efa1e9354c211a1fdae0136    1.06 KiB                    [emitted]
                  images/icon_more.svg?1f0cd091761b9003fafb2dc479b8cdbb   415 bytes                    [emitted]
                  images/icon_more.svg?5ffce4d50083bacb6446cde2c1fa494c   415 bytes                    [emitted]
                   images/icon_off.png?8c888265681d3a68c9d5e9c2eb9c36ce    81 bytes                    [emitted]
                    images/icon_on.png?85e42f2cc354a69e7ef0e6be8424d1bc   117 bytes                    [emitted]
                  images/icon_plus.svg?6a75197982c27344de5c1daa7a2b7285   426 bytes                    [emitted]
              images/icon_redcheck.svg?c485dd0709f5b31051a4ee955ea897c8   382 bytes                    [emitted]
                images/icon_search.png?160b5e08ff9484a541e8c12dbe242a5f   758 bytes                    [emitted]
                images/icon_search.svg?ac86e0f2c62e978a829eae5eb57c74df   476 bytes                    [emitted]
       images/icon_step02_feature1.png?368fd33ff958f68452af8984a45d52d9   290 bytes                    [emitted]
       images/icon_step03_feature2.png?a60144a6ad35a58869b09ad65742a41e   569 bytes                    [emitted]
       images/icon_step04_feature3.png?5d1adc86e2de29cdc4839fe8f9b85aa9   617 bytes                    [emitted]
                   images/icon_tab.svg?d57d9ec7b10f62ab35983228822b165e   686 bytes                    [emitted]
                    images/icon_tw.svg?a6ac9e7c1db5e588ce50330cccc837b1    1.16 KiB                    [emitted]
              images/icon_tw_login.svg?d70c685725daa619bf1d3b8215b81250    1.03 KiB                    [emitted]
               images/icon_twitter.png?79dd10d73b6d657317480752957e1239   918 bytes                    [emitted]
             images/icon_white-tab.svg?e0e8ca623728d03ed67f2c880cc49557   680 bytes                    [emitted]
             images/image_cfcase01.jpg?b14ce70e446a0f05e9599964dde5317f     341 KiB                    [emitted]
             images/image_cfcase02.jpg?0ed4931d14fe3d29d27fd15850b2bddd     363 KiB                    [emitted]
             images/image_cfcase03.jpg?65dfbec09e1ea84779608518a4962a31     269 KiB                    [emitted]
         images/image_croudfunding.png?6b5dd984d95aad4a1a04033c22df26f4    13.2 KiB                    [emitted]
                images/image_media.png?4465aabff513ac9441c5227cf077e6f7      12 KiB                    [emitted]
                images/image_salon.png?139d50bfa87703626daa40ae84e0ff95    12.6 KiB                    [emitted]
images/image_step02_smartphone--pc.png?6e4987db68702ec8fc2593680d018966    27.4 KiB                    [emitted]
images/image_step02_smartphone--sp.png?9b76642c6522eaf477467e1f54b54508     374 KiB                    [emitted]
    images/image_step03_fellow--pc.png?d603bafccc39a7cf45770c73e871b188    62.6 KiB                    [emitted]
    images/image_step03_fellow--sp.png?f18eb1024afe4e165d833362031505e5     167 KiB                    [emitted]
     images/image_step04_check--pc.png?7749887c5e71bd0670ce01c3ba99c9e5    2.77 KiB                    [emitted]
     images/image_step04_check--sp.png?3796a34c6752673164405e955805bd7b    6.41 KiB                    [emitted]
            images/img_akiko-jyoou.png?ddbff7f7723f00c09a08fda95f0442b9    95.5 KiB                    [emitted]
        images/img_ikenobou-senkou.png?d3df32ada87f00313a2fc36fdd5b2b10    54.3 KiB                    [emitted]
        images/img_kongou-hisanori.png?eae96a4275cd3e80ec5a985f5dbe28c6    99.5 KiB                    [emitted]
              images/img_pc-illust.png?b8ba692706b3266e65e360c438004e9c    31.1 KiB                    [emitted]
          images/img_reizei-kimiko.png?58fa794e7c92b3f0dbf18b207bfc5047    77.8 KiB                    [emitted]
           images/img_sen-genshitu.png?4f6f8f3cea15b9cf0d0447feac6b523f    72.7 KiB                    [emitted]
              images/img_sp-illust.png?20df87fb3e19c4e3d1e8dbc4b9dc07a7    85.9 KiB                    [emitted]
                       images/lock.svg?7f9f2a7b9d49aae2a13732a540e257b3   544 bytes                    [emitted]
                  images/logo-amex.png?ec74e8075e32257559190200b1d6aefb    1.23 KiB                    [emitted]
                images/logo-diners.png?67daf7538046fa7e76eb167c971cfbe6    2.24 KiB                    [emitted]
                   images/logo-jcb.png?af671ff01fc9b6a2605b1b10e59d7837    1.88 KiB                    [emitted]
           images/logo_black_title.png?f5ba60882193ccde417f33a4687ce0c4    1.47 KiB                    [emitted]
           images/logo_black_title.svg?8174afa7103fee68d14b16def992ab75    2.39 KiB                    [emitted]
            images/logo_mastercard.png?abae1edc66b8145fafd8d36f30711a78    2.17 KiB                    [emitted]
        images/logo_title-thekyoto.svg?4d8c55667761a20022bfcc3f4a8a89b5    12.5 KiB                    [emitted]
                  images/logo_visa.png?45616e0c6cbff1679a9cc450b48b79c9    1.98 KiB                    [emitted]
                  images/logo_wolf.png?e3a37e28d6b444b0646508f056dd6cc8    29.3 KiB                    [emitted]
               images/office_kyoto.jpg?bee89e1441a34b7fd7d23dafe1097426      72 KiB                    [emitted]
               images/opening_logo.svg?1d8ab206f19f82c0fcc8b670bef9e352      12 KiB                    [emitted]
       images/text_step01_desc--pc.png?3988ddeca9b3e3af3ab3cc07cb838113    4.07 KiB                    [emitted]
       images/text_step01_desc--sp.png?1475c7e1e676383a5a00449fd28c16ab    7.42 KiB                    [emitted]
         images/text_step02__title.png?c850d1edba9d79bf331a2f1f330acdc8    1.98 KiB                    [emitted]
       images/text_step02_desc--pc.png?86df41469b6400ca8a90529bf807636b    3.11 KiB                    [emitted]
       images/text_step02_desc--sp.png?e98eb121da75c4cad60382248c0e0d19    5.46 KiB                    [emitted]
   images/text_step03__collabo--pc.png?e524674886d1a6e0b2b02d48cd4b8080  1020 bytes                    [emitted]
   images/text_step03__collabo--sp.png?374f7579d65b848f1b4b9cd099a83496    1.59 KiB                    [emitted]
         images/text_step03__title.png?86fee527886b1308ad4a49c16d310f66    1.84 KiB                    [emitted]
           images/text_step03_desc.png?a592bef3f35fa6b3fcf1f5052d0d1c82    6.11 KiB                    [emitted]
         images/text_step04__title.png?4e7cbdc75c7d2881c723a0041571d95f    1.15 KiB                    [emitted]
       images/text_step04_desc--pc.png?55f9bb85dd0390fa4951b8d4e10a1a42    4.21 KiB                    [emitted]
       images/text_step04_desc--sp.png?933ae2f4866a2ca6b6fb8f87dd7c5b3d    7.38 KiB                    [emitted]
       images/text_step04_download.png?3fd876355cf187642482f1cdae3deca6    1.08 KiB                    [emitted]
              images/tutorial_logo.svg?375f3dd7fe270fdc810bde22db72530c      21 KiB                    [emitted]

ERROR in ./node_modules/scrollmagic/scrollmagic/uncompressed/plugins/animation.gsap.js (./node_modules/imports-loader?define=>false!./node_modules/scrollmagic/scrollmagic/uncompressed/plugins/animation.gsap.js)
Module not found: Error: Can't resolve 'gsap/dist/gsap' in '/Users/ryo/Documents/workspace/north/source/src/node_modules/scrollmagic/scrollmagic/uncompressed/plugins'
 @ ./node_modules/scrollmagic/scrollmagic/uncompressed/plugins/animation.gsap.js (./node_modules/imports-loader?define=>false!./node_modules/scrollmagic/scrollmagic/uncompressed/plugins/animation.gsap.js) 38:13-38
 @ ./node_modules/babel-loader/lib??ref--4-0!./node_modules/vue-loader/lib??vue-loader-options!./resources/js/components/articles/todays-article-preview/Preview.vue?vue&type=script&lang=js&
 @ ./resources/js/components/articles/todays-article-preview/Preview.vue?vue&type=script&lang=js&
 @ ./resources/js/components/articles/todays-article-preview/Preview.vue
 @ ./resources/js/router/cms-routes.js
 @ ./resources/js/cms-app.js
 @ multi ./resources/js/cms-app.js

Module not found: Error: Can't resolve 'gsap/dist/gsap'

Can I fix this ?

ryo@kusolingo3 src % node -v
v11.8.0
ryo@kusolingo3 src % npm -v
6.14.8
@apboon
Copy link

apboon commented Dec 2, 2020

I use gulp with browserify.. and I get the same bug..
When I change..

var gsap = require("gsap/dist/gsap") || require("gsap");

..into..

var gsap = require("gsap");

..it works again.
I'm guessing (at first glance) the || doesn't work with require.

@maviarebo
Copy link

Hey folks, I'm getting some weird shivers while scrolling our website using GSAP ScrollSmooother.

Is there anyone who can provide information about this error?

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

No branches or pull requests

3 participants