craft.js icon indicating copy to clipboard operation
craft.js copied to clipboard

how to build craft.js in local

Open kams-online opened this issue 3 years ago • 6 comments

Hi, Can you please detail the steps to build/run craft js in my local, I need to build and host it in a apache server for more customization, Any pre-requisite prior to install..

Please help, AG


$ npm install npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: undefined@undefined npm ERR! Found: [email protected] npm ERR! node_modules/react npm ERR! dev react@"^16.9.0" from the root project npm ERR! peer react@"" from @testing-library/[email protected] npm ERR! node_modules/@testing-library/react npm ERR! dev @testing-library/react@"^9.4.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"17.0.2" from [email protected] npm ERR! node_modules/react-dom npm ERR! peer react-dom@"" from @testing-library/[email protected] npm ERR! node_modules/@testing-library/react npm ERR! dev @testing-library/react@"^9.4.0" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See C:\Users\Xxxxx \AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Xxxxx \AppData\Local\npm-cache_logs\2021-06-19T16_02_38_185Z-debug.log

kams-online avatar Jun 19 '21 16:06 kams-online

Can you try using yarn, and run yarn build at the root folder

prevwong avatar Jun 20 '21 09:06 prevwong

thanks @prevwong .

I tried these steps, thanks for the help

yarn install yarn run yarn build yarn run yarn run deploy

It created a site folder, and now i am able to host it.

kams-online avatar Jun 20 '21 15:06 kams-online

Can you update the peer-dependency to be >16.8.0

rsomepalli avatar Sep 13 '21 23:09 rsomepalli

👋 Peer dep should be good as of #307 if Prev takes another look at this ticket and wants to close it :D

AndrewNatoli avatar Jan 10 '22 21:01 AndrewNatoli

I get an error lerna ERR! yarn run build exited 1 in '@craftjs/utils'

tjmcdonough avatar Feb 02 '23 11:02 tjmcdonough

Hi, @tjmcdonough I am getting the same error did you find any solution for that?

@craftjs/utils: Original error: Cannot use import statement outside a module @craftjs/utils: https://rollupjs.org/command-line-interface/#bundleconfigascjs @craftjs/utils: /Users/muhammadamin/Dev/Lukas/craft.js/packages/utils/rollup.config.js:1 @craftjs/utils: import config from '../../rollup.config'; @craftjs/utils: ^^^^^^ @craftjs/utils: SyntaxError: Cannot use import statement outside a module @craftjs/utils: at Object.compileFunction (node:vm:352:18) @craftjs/utils: at wrapSafe (node:internal/modules/cjs/loader:1033:15) @craftjs/utils: at Module._compile (node:internal/modules/cjs/loader:1069:27) @craftjs/utils: at Module._extensions..js (node:internal/modules/cjs/loader:1159:10) @craftjs/utils: at Module.load (node:internal/modules/cjs/loader:981:32) @craftjs/utils: at Module._load (node:internal/modules/cjs/loader:827:12) @craftjs/utils: at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:170:29) @craftjs/utils: at ModuleJob.run (node:internal/modules/esm/module_job:198:25) @craftjs/utils: at async Promise.all (index 0) @craftjs/utils: at async ESMLoader.import (node:internal/modules/esm/loader:409:24) lerna ERR! yarn run build exited 1 in '@craftjs/utils'

AminRafaey avatar Sep 08 '23 14:09 AminRafaey