plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
426 stars 574 forks source link

Failed to compile: Attempted import error: 'addonReducers' is not exported from '../../../../../src/config'. #1586

Closed renbro299 closed 3 years ago

renbro299 commented 3 years ago

For the commands, I used "npx @plone/create-volto-app volto" to create the volto instance. I also ran "yarn start".

A screenshot of the error screen is provided below:

Screen Shot 2020-06-15 at 11 32 40 AM
tisto commented 3 years ago

I guess we need to adapt create-volto-app to this change:

https://github.com/plone/volto/pull/1542

@tiberiuichim are you familiar with how create-volto-app works? Could you imagine to have a look?

tiberiuichim commented 3 years ago

@tisto sorry, I'm late about this, we're migrating a website today, had a ton of work to do. I saw that @iFlameing solved the issue, bravo!

tisto commented 3 years ago

@tiberiuichim we thought so. Though, it is still broken it seems:

➜  workspace git:(master) ✗ npm install -g yarn
/Users/timo/.nvm/versions/node/v12.16.1/bin/yarn -> /Users/timo/.nvm/versions/node/v12.16.1/lib/node_modules/yarn/bin/yarn.js
/Users/timo/.nvm/versions/node/v12.16.1/bin/yarnpkg -> /Users/timo/.nvm/versions/node/v12.16.1/lib/node_modules/yarn/bin/yarn.js
+ yarn@1.22.4
updated 1 package in 0.431s
➜  workspace git:(master) ✗ npm install -g @plone/create-volto-app
/Users/timo/.nvm/versions/node/v12.16.1/bin/create-volto-app -> /Users/timo/.nvm/versions/node/v12.16.1/lib/node_modules/@plone/create-volto-app/bin/create-volto-app.js
+ @plone/create-volto-app@6.2.0
updated 1 package in 2.226s
➜  workspace git:(master) ✗ create-volto-app myvoltoproject
/Users/timo/.nvm/versions/node/v12.16.1/lib/node_modules/@plone/create-volto-app/volto-starter-kit

Creating myvoltoproject...

⠋ Copying files[Error: ENOENT: no such file or directory, lstat '/Users/timo/.nvm/versions/node/v12.16.1/lib/node_modules/@plone/create-volto-app/volto-starter-kit'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'lstat',
  path: '/Users/timo/.nvm/versions/node/v12.16.1/lib/node_modules/@plone/create-volto-app/volto-starter-kit'
}

I have no clue how this git submodules magic with volto-starter-kit works. Maybe @nileshgulia1 can help with it...

renbro299 commented 3 years ago

@iFlameing How did you solve the issue? I am still getting the same errors as before.

Screen Shot 2020-06-16 at 11 06 06 AM
renbro299 commented 3 years ago
Screen Shot 2020-06-16 at 11 14 31 AM
iFlameing commented 3 years ago

@renbroo299 Somehow our new release not populating the volto-starter-kit. I am working on it. But if you want to develop locally. You have to do some steps.

  1. clone the repo
  2. install the dependency
  3. run this command
  4. git submodule init also git submodule update
  5. npm link
  6. create-volto-app volto and you will able to create volto app.

I am investigating why volto-starter-kit, not auto-populating.

iFlameing commented 3 years ago

@renbro299 please use this

 npm install git+https://github.com/plone/create-volto-app
renbro299 commented 3 years ago

Done. It worked. Thank you!

tisto commented 3 years ago

@renbro299 can you please try again with the latest release:

https://www.npmjs.com/package/@plone/create-volto-app/v/6.2.1

iFlameing commented 3 years ago

@tisto It will not work. I tested it out somehow the submodule is not populated. we have to go with the git version. we should together look into it tomorrow ;(

iFlameing commented 3 years ago

we still getting the copy error because volto-starter-kit is not present in nodemodules/@plone/create-volto-app

nileshgulia1 commented 3 years ago

@tisto @tiberiuichim Just seen the messages. Having too work load these days, will get back to look on this in coming weekend.

tiberiuichim commented 3 years ago

I have this error after creating a new volto project with:

npx @plone/create-volto-app volto
/home/tibi/work/my-volto-app/node_modules/resolve/lib/sync.js:74
    var err = new Error("Cannot find module '" + x + "' from '" + parent + "'");                                                                                                      ^

Module build failed (from ./node_modules/babel-loader/lib/index.js):                                                                                                    Error: Cannot find module '@babel/plugin-proposal-function-bind' from '/home/tibi/work/my-volto-app'
tiberiuichim commented 3 years ago

I was able to avoid the above problem (which happened at yarn start) by replacing the local yarn.lock with the copy from volto master:


rm yarn.lock
wget https://raw.githubusercontent.com/plone/volto/master/yarn.lock
``
tiberiuichim commented 3 years ago

And now I have this error in the browser console:

webpackHotDevClient.js:15 Uncaught Error: Cannot find module 'webpack-dev-server/client/utils/createSocketUrl'
    at webpackMissingModule (webpackHotDevClient.js:15)
    at Object.<anonymous> (webpackHotDevClient.js:15)
    at Object../node_modules/razzle-dev-utils/webpackHotDevClient.js (webpackHotDevClient.js:276)
    at __webpack_require__ (bootstrap:853)
    at fn (bootstrap:150)
    at Object.0 (theme.js:1)
    at __webpack_require__ (bootstrap:853)
    at checkDeferredModules (bootstrap:45)
    at Array.webpackJsonpCallback [as push] (bootstrap:32)
    at vendors~client.chunk.js:1
iFlameing commented 3 years ago

@tiberiuichim somehow submodule is not populating in new release. That's why it is giving error. The npm not installing the volto starter kit as submodule.

You can see the changes in 6.0.0 and current release.

I don't have much knowledge regarding git submodule that's why I am unable to fix that.

Can you take a look at create-volto-app repo why sumodule is not populating. You can use got version if you want. It is working perfectly fine .

You can find in above comments

tiberiuichim commented 3 years ago

@iFlameing now I got it working. I've used the official method, installing create-volto-app globally (from github) instead of using npx.

npm install -g git+https://github.com/plone/create-volto-app

iFlameing commented 3 years ago

@tiberiuichim did you use latest release 6.2.0

iFlameing commented 3 years ago

Well git version is working.

tiberiuichim commented 3 years ago

Released version doesn't work:

 I  ~/work  npm i -g @plone/create-volto-app                                                                                            Wed 17 Jun 2020 05:58:45 PM UTC/home/tibi/.node_modules/bin/create-volto-app -> /home/tibi/.node_modules/lib/node_modules/@plone/create-volto-app/bin/create-volto-app.js
+ @plone/create-volto-app@6.2.1
updated 1 package in 5.139s
 I  ~/work                                                                                                                       5.4s  Wed 17 Jun 2020 05:59:00 PM UTC I  ~/work  create-volto-app my-volto-app                                                                                               Wed 17 Jun 2020 05:59:05 PM UTC/home/tibi/.node_modules/lib/node_modules/@plone/create-volto-app/volto-starter-kit

Creating my-volto-app...

⠋ Copying files[Error: ENOENT: no such file or directory, lstat '/home/tibi/.node_modules/lib/node_modules/@plone/create-volto-app/volto-starter-kit'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'lstat',
  path: '/home/tibi/.node_modules/lib/node_modules/@plone/create-volto-app/volto-starter-kit'
}
> Error! Copy command failed, try again.
iFlameing commented 3 years ago

Fixed in the latest release @6.2.3. Now you can install the @plone/create-volto-app globally using npm as well as yarn

npm install -g @plone/create-volto-app
iFlameing commented 3 years ago

I am also closing this because it is fixed :)