-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[help] "npm run build" or "npm run serve" didn't work as expected #3523
Comments
So the focus will be the submodule $ git submodule update --init --recursive --force themes/docsy
Submodule path 'themes/docsy': checked out 'fd669b752b7f83fb2eb57cacd2c8f334f86ca7d2'
$ ls themes/docsy
CHANGELOG.md LICENSE dependencies go.sum images package.json theme.toml
CONTRIBUTING.md README.md docker-compose.yaml hugo.yaml layouts postcss.config.js userguide
Dockerfile assets go.mod i18n netlify.toml static
$ npm run serve --ignore-scripts "_get:submodule" Then I was seeing more errors:
|
Hi. I just did a clean build (on two different machines) and it works fine. Let's see if a clean build works for you too. Try the following from a new terminal:
|
Interestingly, it worked in a clean clone. I didn't use $ git remote -vv
origin [email protected]:brightzheng100/opentelemetry.io.git (fetch)
origin [email protected]:brightzheng100/opentelemetry.io.git (push)
upstream https://github.com/open-telemetry/opentelemetry.io.git (fetch)
upstream https://github.com/open-telemetry/opentelemetry.io.git (push)
$ git fetch upstream
$ git merge upstream/main
Already up to date.
$ nvm install
Found '/Users/brightzheng/workspaces/OSS/OpenTelemetry/opentelemetry.io/.nvmrc' with version <lts/*>
v20.9.0 is already installed.
Now using node v20.9.0 (npm v10.1.0)
$ npm install
> prepare
> npm run seq -- get:submodule _prepare:docsy
> seq
> bash -c 'for cmd in "$@"; do npm run $cmd || exit 1; done' - get:submodule _prepare:docsy
> get:submodule
> npm run _get:${GET:-submodule}
> _get:submodule
> set -x && git submodule update --init ${DEPTH:- --depth 1}
+ git submodule update --init --depth 1
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
fatal: transport 'file' not allowed
fatal: Fetched in submodule path 'content-modules/community', but it did not contain 0cb6dcadb53f1f7ffe5ef819ceef02ac9e6886c8. Direct fetching of that commit failed.
npm ERR! code 1
npm ERR! path /Users/brightzheng/workspaces/OSS/OpenTelemetry/opentelemetry.io
npm ERR! command failed
npm ERR! command sh -c npm run seq -- get:submodule _prepare:docsy
npm ERR! A complete log of this run can be found in: /Users/brightzheng/.npm/_logs/2023-11-09T08_48_08_191Z-debug-0.log $ git status
On branch update-building-a-trace-receiver
Your branch is ahead of 'upstream/main' by 2 commits.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: content-modules/community (new commits, modified content)
modified: content-modules/opamp-spec (new commits, modified content)
modified: content-modules/opentelemetry-proto (new commits, modified content)
modified: content-modules/opentelemetry-specification (modified content)
modified: content-modules/semantic-conventions (new commits, modified content)
modified: content/en/docs/collector/trace-receiver.md
modified: themes/docsy (modified content)
no changes added to commit (use "git add" and/or "git commit -a") |
I tried deinit the submodules but it didn't help: $ git submodule deinit -f --all
Cleared directory 'content-modules/community'
Submodule 'content-modules/community' (https://github.com/open-telemetry/community) unregistered for path 'content-modules/community'
Cleared directory 'content-modules/opamp-spec'
Submodule 'content-modules/opamp-spec' (https://github.com/open-telemetry/opamp-spec) unregistered for path 'content-modules/opamp-spec'
Cleared directory 'content-modules/opentelemetry-proto'
Submodule 'content-modules/opentelemetry-proto' (https://github.com/open-telemetry/opentelemetry-proto) unregistered for path 'content-modules/opentelemetry-proto'
Cleared directory 'content-modules/opentelemetry-specification'
Submodule 'content-modules/opentelemetry-specification' (https://github.com/open-telemetry/opentelemetry-specification.git) unregistered for path 'content-modules/opentelemetry-specification'
Cleared directory 'content-modules/semantic-conventions'
Submodule 'content-modules/semantic-conventions' (https://github.com/open-telemetry/semantic-conventions) unregistered for path 'content-modules/semantic-conventions'
Cleared directory 'themes/docsy'
Submodule 'themes/docsy' (https://github.com/cncf/docsy.git) unregistered for path 'themes/docsy'
$ git status
On branch update-building-a-trace-receiver
Your branch is ahead of 'upstream/main' by 2 commits.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: content/en/docs/collector/trace-receiver.md $ npm run serve
> serve
> npm run serve:hugo
> preserve:hugo
> npm run _prebuild
> _prebuild
> npm run seq -- get:submodule cp:spec
> seq
> bash -c 'for cmd in "$@"; do npm run $cmd || exit 1; done' - get:submodule cp:spec
> get:submodule
> npm run _get:${GET:-submodule}
> _get:submodule
> set -x && git submodule update --init ${DEPTH:- --depth 1}
+ git submodule update --init --depth 1
Submodule 'content-modules/community' (https://github.com/open-telemetry/community) registered for path 'content-modules/community'
Submodule 'content-modules/opamp-spec' (https://github.com/open-telemetry/opamp-spec) registered for path 'content-modules/opamp-spec'
Submodule 'content-modules/opentelemetry-proto' (https://github.com/open-telemetry/opentelemetry-proto) registered for path 'content-modules/opentelemetry-proto'
Submodule 'content-modules/opentelemetry-specification' (https://github.com/open-telemetry/opentelemetry-specification.git) registered for path 'content-modules/opentelemetry-specification'
Submodule 'content-modules/semantic-conventions' (https://github.com/open-telemetry/semantic-conventions) registered for path 'content-modules/semantic-conventions'
Submodule 'themes/docsy' (https://github.com/cncf/docsy.git) registered for path 'themes/docsy'
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
fatal: transport 'file' not allowed
fatal: Fetched in submodule path 'content-modules/community', but it did not contain 0cb6dcadb53f1f7ffe5ef819ceef02ac9e6886c8. Direct fetching of that commit failed. |
It finally worked with the flow like this: $ git clone [email protected]:brightzheng100/opentelemetry.io.git opentelemetry.io-mine
$ cd opentelemetry.io-mine
$ git remote add upstream https://github.com/open-telemetry/opentelemetry.io.git
$ git fetch upstream
$ git merge upstream/main
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash $ nvm install
$ npm install
$ npm run serve |
Thanks for confirming that a clean clone builds just fine for you too. I'll remove the "bug" label in that case, and we can continue attempting to debug your setup and/or workflow. |
As is mentioned in Local setup, you need to execute |
I just tried more and you're right that my flow may not be correct previously, so I updated my previous comment with the workable flow I used. BTW, is the |
I'm glad it's working now!
No, use of |
By following the contribution guide, after drafting the PR for Issue #3488, I was trying to build the site for the final review but the process was broken.
I got this:
So I manually updated the submodules with:
This didn't work:
So tried something else:
And all submodules had been updated, expected 'themes/docsy':
Obviously, the submodule of 'themes/docsy' had issues.
And then tried again with
_get:submodule
ignored:npm run serve --ignore-scripts "_get:submodule"
I got this:
So is this a known issue or did I do something wrongly here?
The text was updated successfully, but these errors were encountered: