Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Building gui.ajax #1444

Open
badfiles opened this issue Dec 27, 2018 · 13 comments
Open

Building gui.ajax #1444

badfiles opened this issue Dec 27, 2018 · 13 comments

Comments

@badfiles
Copy link

It is impossible to build with

npm install
grunt

because it has unresolved dependencies

npm WARN [email protected] requires a peer of react@^15.4.2 but none was installed.
npm WARN [email protected] requires a peer of [email protected] - 0.14 || ^15.0.0 but none was installed.
npm WARN [email protected] requires a peer of react@^15.4.0-0 but none was installed.
npm WARN [email protected] requires a peer of react-dom@^15.4.0-0 but none was installed.
npm WARN [email protected] requires a peer of react@^0.14.7 || ^15.0.1 but none was installed.
npm WARN [email protected] requires a peer of react@^0.14.0 but none was installed.
npm WARN [email protected] requires a peer of react-dom@^0.14.0 but none was installed.
npm WARN [email protected] requires a peer of react@^0.14.3 || ^15.0.0 but none was installed.
npm WARN [email protected] requires a peer of react-dom@^0.14.3 || ^15.0.0 but none was installed.
npm WARN [email protected] requires a peer of react@^0.14.0 || ^15.0.0 but none was installed.
npm WARN [email protected] requires a peer of react@^15.4.0 but none was installed.
npm WARN [email protected] requires a peer of react-dom@^15.4.0 but none was installed.
npm WARN [email protected] requires a peer of react@^15.4.2 but none was installed.
npm WARN [email protected] requires a peer of react@^0.14.0 || ^15.0.0 but none was installed.
npm WARN [email protected] requires a peer of react@^0.14.0 || ^15.0.0 but none was installed.
npm WARN [email protected] requires a peer of react@^0.14.7 || ^15.0.1 but none was installed.

grunt runs successfully, but on execution I get

VM9178:7 Failed Loading React, PydioReactUI :  TypeError: _react.default.createContext is not a function
    at Object.require.911.@babel/runtime/helpers/interopRequireDefault (bundle.prod.min.js:formatted:60624)
    at s (bundle.prod.min.js:formatted:17)
    at eval (bundle.prod.min.js:formatted:19)
    at Object.require.912../Context (bundle.prod.min.js:formatted:60642)
    at s (bundle.prod.min.js:formatted:17)
    at eval (bundle.prod.min.js:formatted:19)
    at Object.require.react-redux../components/Context (bundle.prod.min.js:formatted:68257)
    at s (bundle.prod.min.js:formatted:17)
    at s (PydioHOCs.min.js:1)
    at eval (PydioHOCs.min.js:1)
(anonymous) @ VM9178:7
Promise.catch (async)
ResourcesManager.loadClassesAndApply @ VM9178:7
(anonymous) @ VM9178:11
Pydio.init @ VM9178:11
(anonymous) @ pydio.boot.min.js?v=8.2.2:4
scriptLoaded @ pydio.boot.min.js?v=8.2.2:4
(anonymous) @ pydio.boot.min.js?v=8.2.2:4
Promise.then (async)
Connexion.loadLibrary @ pydio.boot.min.js?v=8.2.2:4
PydioBootstrap.refreshContextVariablesAndInit @ pydio.boot.min.js?v=8.2.2:4
PydioBootstrap.loadBootConfig @ pydio.boot.min.js?v=8.2.2:4
(anonymous) @ pydio.boot.min.js?v=8.2.2:4
trigger @ pydio.boot.min.js?v=8.2.2:3
onReady @ pydio.boot.min.js?v=8.2.2:3
@cdujeu
Copy link
Member

cdujeu commented Dec 28, 2018

what are your grunt / npm versions?
Do you have already a more recent version of react installed?

@badfiles
Copy link
Author

npm v3.10.10
The grunt command line interface (v1.3.2)
npm install gives warnings

npm WARN [email protected] requires a peer of react@^16.4.0-0 but none was installed.
npm WARN [email protected] requires a peer of react@^16.2.0 but none was installed.
npm WARN [email protected] requires a peer of react-dom@^16.2.0 but none was installed.
npm WARN [email protected] requires a peer of react@^0.14.0 but none was installed.
npm WARN [email protected] requires a peer of react-dom@^0.14.0 but none was installed.
npm WARN [email protected] requires a peer of react@^15.6.2 but none was installed.
npm WARN [email protected] requires a peer of enzyme@^3.0.0 but none was installed.
npm WARN [email protected] requires a peer of react@^16.0.0-0 but none was installed.
npm WARN [email protected] requires a peer of react-dom@^16.0.0-0 but none was installed.
npm WARN [email protected] requires a peer of react@^16.0.0 but none was installed.
npm WARN [email protected] requires a peer of react@^16.0.0 but none was installed.
npm WARN [email protected] requires a peer of acorn@^6.0.0 but none was installed.

grunt says Done, without errors.
after cleaning pydio cache I have

VM16687:7 Failed Loading React, PydioReactUI :  TypeError: _react.default.createContext is not a function
    at Object.require.910.@babel/runtime/helpers/interopRequireDefault (bundle.prod.min.js:54)
    at s (bundle.prod.min.js:1)
    at eval (bundle.prod.min.js:1)
    at Object.require.911../Context (bundle.prod.min.js:54)
    at s (bundle.prod.min.js:1)
    at eval (bundle.prod.min.js:1)
    at Object.require.react-redux../components/Context (bundle.prod.min.js:62)
    at s (bundle.prod.min.js:1)
    at s (PydioHOCs.min.js:1)
    at eval (PydioHOCs.min.js:1)

on the js console.

@Blindmikey
Copy link

I've run into this same issue.

@sunny0070
Copy link

I'm also having same issue. Is there any solution for this issue?

@cdujeu
Copy link
Member

cdujeu commented Apr 19, 2019

mmmm, on our build machine, we have
node --version
6.10.2
npm version
3.10.10
Can you check ?

@sunny0070
Copy link

I've different version of node and npm.
So, I switched to version you mentioned and tried to run below command:
npm install ( gui.ajax )
grunt

Cli Result:-
Done, without errors.

But when tried to access pydio. I found it's not working and in console error mention below

Failed Loading React, PydioReactUI : TypeError: _react.default.createContext is not a function
at Object.require.910.@babel/runtime/helpers/interopRequireDefault (/pydio/plugins/gui.ajax/res/build/bundle.prod.min.js:54)
at s (/pydio/plugins/gui.ajax/res/build/bundle.prod.min.js:1)
at eval (/pydio/plugins/gui.ajax/res/build/bundle.prod.min.js:1)
at Object.require.911.../utils/Subscription (/pydio/plugins/gui.ajax/res/build/bundle.prod.min.js:54)
at s (/pydio/plugins/gui.ajax/res/build/bundle.prod.min.js:1)
at eval (/pydio/plugins/gui.ajax/res/build/bundle.prod.min.js:1)
at Object.require.react-redux../components/Context (/pydio/plugins/gui.ajax/res/build/bundle.prod.min.js:62)
at s (/pydio/plugins/gui.ajax/res/build/bundle.prod.min.js:1)
at s (/pydio/plugins/gui.ajax/res/build/PydioHOCs.js:1)
at eval (/pydio/plugins/gui.ajax/res/build/PydioHOCs.js:1)

@sunny0070
Copy link

sunny0070 commented Apr 19, 2019

@cdujeu
Copy link
Member

cdujeu commented Apr 19, 2019

I'm lost here : if you are trying to build the front for pydio 8, why do you use the Gruntfile from cells-front (which is deprecated by the way, as the front for pydio cells is in the main Cells repo). Why not using pydio-core/..../gui.ajax/Gruntfile.js??

@sunny0070
Copy link

sunny0070 commented Apr 19, 2019

Now, I'm using latest grunt file but this time again encounter same error with different trace

Failed Loading React, PydioReactUI : TypeError: _react.default.createContext is not a function
at Object.require.910.@babel/runtime/helpers/interopRequireDefault (bundle.prod.min.js:54)
at s (bundle.prod.min.js:1)
at eval (bundle.prod.min.js:1)
at Object.require.911.../utils/Subscription (bundle.prod.min.js:54)
at s (bundle.prod.min.js:1)
at eval (bundle.prod.min.js:1)
at Object.require.react-redux../components/Context (bundle.prod.min.js:62)
at s (bundle.prod.min.js:1)
at s (_prelude.js:1)
at eval (_prelude.js:1)

(anonymous) @ ResourcesManager.js:411
  Promise.catch (async)  
  loadClassesAndApply @
  (anonymous) @
  init @
  (anonymous) @
  refreshContextVariablesAndInit @
  loadBootConfig @
  (anonymous) @
  trigger @
  onReady @

@sunny0070
Copy link

Do you confirm your react version you are using?

@sunny0070
Copy link

sunny0070 commented Apr 30, 2019

In my case, react-redux library is creating issue because react-redux version higher or equal 6 is using different context API.

So, using react-redux version: 5.1.1 fix issue for me.

I hope this help someone.

@cdujeu
Copy link
Member

cdujeu commented May 2, 2019

ha ha ok so we should probably fix this in the json

@sunny0070
Copy link

Yes, please so it's not trouble other people.
Thanks

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

No branches or pull requests

4 participants