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

split up files to have browser one and node #20

Merged
merged 23 commits into from
Jul 1, 2018
Merged

Conversation

bote795
Copy link
Owner

@bote795 bote795 commented Jun 30, 2018

No description provided.

@coveralls
Copy link

coveralls commented Jun 30, 2018

Pull Request Test Coverage Report for Build 95

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 57: 0.0%
Covered Lines: 31
Relevant Lines: 31

💛 - Coveralls

@bote795
Copy link
Owner Author

bote795 commented Jun 30, 2018

logs:

Version: webpack 4.14.0
Child
    Hash: 037f184ff3bf8985a9a9
    Time: 8587ms
    Built at: 06/30/2018 7:50:50 PM
       Asset     Size  Chunks             Chunk Names
    index.js  105 KiB       0  [emitted]  main
    [125] (webpack)/buildin/global.js 489 bytes {0} [built]
    [126] ./lib/querys/removeMedia.js 455 bytes {0} [built]
    [127] ./lib/querys/updateAnime.js 881 bytes {0} [built]
    [128] ./lib/querys/searchAnimeByName.js 586 bytes {0} [built]
    [129] ./lib/querys/getUserListById.js 827 bytes {0} [built]
    [130] ./lib/querys/index.js 934 bytes {0} [built]
    [136] ./lib/Anilist.js 7.48 KiB {0} [built]
    [339] multi babel-polyfill ./lib/Anilist.js 40 bytes {0} [built]
        + 332 hidden modules
Child
    Hash: 174bd78e61ec6c04d715
    Time: 9135ms
    Built at: 06/30/2018 7:50:51 PM
              Asset     Size  Chunks             Chunk Names
    anilist/node.js  114 KiB       0  [emitted]  main
     [64] external "stream" 42 bytes {0} [built]
     [91] external "url" 42 bytes {0} [built]
     [92] external "http" 42 bytes {0} [built]
    [128] ./lib/querys/removeMedia.js 455 bytes {0} [built]
    [129] ./lib/querys/updateAnime.js 881 bytes {0} [built]
    [130] ./lib/querys/searchAnimeByName.js 586 bytes {0} [built]
    [131] ./lib/querys/getUserListById.js 827 bytes {0} [built]
    [132] ./lib/querys/index.js 934 bytes {0} [built]
    [133] external "zlib" 42 bytes {0} [built]
    [134] external "https" 42 bytes {0} [built]
    [142] ./lib/Anilist.js 7.48 KiB {0} [built]
    [345] multi babel-polyfill ./lib/Anilist.js 40 bytes {0} [built]
        + 334 hidden modules
    
    WARNING in ./node_modules/node-fetch/lib/index.es.js
    Module not found: Error: Can't resolve 'encoding' in '/home/circleci/repo/node_modules/node-fetch/lib'
     @ ./node_modules/node-fetch/lib/index.es.js
     @ ./node_modules/cross-fetch/dist/node-ponyfill.js
     @ ./node_modules/cross-fetch/dist/node-polyfill.js
     @ ./node_modules/graphql-request/dist/src/index.js
     @ ./lib/Anilist.js
     @ multi babel-polyfill ./lib/Anilist.js
npm info it worked if it ends with ok
npm info using npm@4.2.0
npm info using node@v7.10.1
npm info lifecycle aniwrapper@1.0.0~preexamples: aniwrapper@1.0.0
npm info lifecycle aniwrapper@1.0.0~examples: aniwrapper@1.0.0

> aniwrapper@1.0.0 examples /home/circleci/repo
> node example/index.js

There was an error %O TypeError: r.call is not a function
    at Object.o (/home/circleci/repo/dist/anilist/node.js:1:58700)
    at t.<anonymous> (/home/circleci/repo/dist/anilist/node.js:1:61885)
    at /home/circleci/repo/dist/anilist/node.js:1:60426
    at Object.next (/home/circleci/repo/dist/anilist/node.js:1:60531)
    at /home/circleci/repo/dist/anilist/node.js:1:59475
    at o (/home/circleci/repo/dist/anilist/node.js:1:59252)
    at t.request (/home/circleci/repo/dist/anilist/node.js:1:61682)
    at n.default (/home/circleci/repo/dist/anilist/node.js:1:42342)
    at t.value (/home/circleci/repo/dist/anilist/node.js:1:65036)
    at main (/home/circleci/repo/example/index.js:9:6)
npm info lifecycle aniwrapper@1.0.0~postexamples: aniwrapper@1.0.0
`

@bote795
Copy link
Owner Author

bote795 commented Jul 1, 2018

@lquixada, would you happen to know why this is happening? Im pretty sure it has to do with cross-fetch ( in my webpack i target:node, and in my local computer this works (mac) but runing on the build it seems to fail) . I tried to follow what you did here: https://gist.github.com/lquixada/37f542e734fa41e3000d4b8283685389

@lquixada
Copy link

lquixada commented Jul 1, 2018

I did a clean install on branch feature/splitPackages here and couldn't reproduce the error. The error mentioned in your logs has been fixed in version 2.2.1 (https://github.com/lquixada/cross-fetch/releases/tag/v2.2.1).

It seems that if you install using npm install will get version 2.0.0, and with yarn install 2.2.2 because of the "resolutions" property in package.json.

@bote795
Copy link
Owner Author

bote795 commented Jul 1, 2018

@lquixada thx for checking it out! I agree with your comments. And I get the same behavior. I did do yarn install in the Ci. and the logs says it resolves to the correct one:

Resolving packages...
warning Lockfile has incorrect entry for "cross-fetch@2.0.0". Ingoring it.

Do you think its just an issue in CircleCi somewhere?

@bote795
Copy link
Owner Author

bote795 commented Jul 1, 2018

@lquixada I think I found it, might be the version the docker container is running, going to try to change that. Thx for your help!

@bote795 bote795 merged commit d0bffe1 into master Jul 1, 2018
@bote795 bote795 deleted the feature/splitPackages branch July 1, 2018 23:27
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

Successfully merging this pull request may close these issues.

None yet

3 participants