Closed renbro299 closed 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?
@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!
@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...
@iFlameing How did you solve the issue? I am still getting the same errors as before.
@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.
git submodule init
also git submodule updateI am investigating why volto-starter-kit, not auto-populating.
@renbro299 please use this
npm install git+https://github.com/plone/create-volto-app
Done. It worked. Thank you!
@renbro299 can you please try again with the latest release:
https://www.npmjs.com/package/@plone/create-volto-app/v/6.2.1
@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 ;(
we still getting the copy error because volto-starter-kit is not present in nodemodules/@plone/create-volto-app
@tisto @tiberiuichim Just seen the messages. Having too work load these days, will get back to look on this in coming weekend.
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'
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
``
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
@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
@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
@tiberiuichim did you use latest release 6.2.0
Well git version is working.
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.
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
I am also closing this because it is fixed :)
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: