Git submodule or yarn

I got my hexo site.
And It’s my git settiings
branch master: submodules and github action with all hexo files like _config.yml and sources in it
branch app: github action build static files for whole sites with files like index.html

  1. github action is successful in building hexo files and push on my app branch always.
  2. local machine is works well in building hexo files also.

by the way the actions in Cloudflare pages is failure in step yarn install 1.22.4

i try like

settings like that

branch: master
command: yarn install && hexo g -d
output dir: /public
roott dir:/

15:45:27.765	yarn install v1.22.4
15:45:27.830	warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
15:45:27.833	[1/4] Resolving packages...
15:45:28.254	[2/4] Fetching packages...
15:45:42.222	info [email protected]: The platform "linux" is incompatible with this module.
15:45:42.222	info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
15:45:42.225	error [email protected]: The engine "node" is incompatible with this module. Expected version "^12.20.0 || >=14". Got "12.18.0"
15:45:42.235	error Found incompatible module.
15:45:42.236	info Visit for documentation about this command.
15:45:42.260	Error during Yarn install
15:45:42.266	Failed: build command exited with code: 1

and i try like that.

settings like
branch: app
output path:/
root path:/

15:42:21.511	Cloning repository...
15:42:23.288	From<BLOG repo name>
15:42:23.289	 * branch            3de4e55a577644e90ec4c56ead22d69bd2cfa076 -> FETCH_HEAD
15:42:23.438	HEAD is now at 3de4e55 Action AutoBuild: (d9f3caa) fix actions4
15:42:23.563	fatal: No url found for submodule path 'themes/arknights' in .gitmodules
15:42:24.274	Failed: error occurred while updating repo submodules

Both two method dies in my deployment i don’t know what to do…

Depending on the version of node you develop on, you can set the environment variable NODE_VERSION. For example, if you are using nodejs 16 you would use NODE_VERSION=16.15.0

1 Like

Oh my god, it can control the version in env vars?

Thank you .

Yeah you can.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.