Skip to content
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

Cannot build exaple #321

Closed
john-schmitz opened this issue Mar 2, 2022 · 8 comments
Closed

Cannot build exaple #321

john-schmitz opened this issue Mar 2, 2022 · 8 comments

Comments

@john-schmitz
Copy link

From a fresh clonned when attempting to build the nodejs example I get:

yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The engine "vscode" appears to be invalid.
warning [email protected]: The engine "vscode" appears to be invalid.
[3/4] Linking dependencies...
warning "lerna > @lerna/version > @lerna/github-client > @octokit/rest > @octokit/[email protected]" has unmet peer dependency "@octokit/core@>=3".
warning "workspace-aggregator-0e515c18-a138-4628-afb7-bb719063b036 > node-example > [email protected]" has incorrect peer dependency "webpack@^4.0.0".
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
warning Workspaces can only be enabled in private projects.
[4/4] Building fresh packages...
$ yarn run clean && yarn run build
yarn run v1.22.17
$ rimraf lib
Done in 0.05s.
yarn run v1.22.17
$ yarn run compile && webpack && yarn run copy
$ tsc
src/client.ts:10:8 - error TS2307: Cannot find module 'monaco-languageclient' or its corresponding type declarations.

10 } from 'monaco-languageclient';
          ~~~~~~~~~~~~~~~~~~~~~~~

src/client.ts:66:19 - error TS7006: Parameter 'errorHandler' implicitly has an 'any' type.

66             get: (errorHandler, closeHandler) => {
                     ~~~~~~~~~~~~

src/client.ts:66:33 - error TS7006: Parameter 'closeHandler' implicitly has an 'any' type.

66             get: (errorHandler, closeHandler) => {
                                   ~~~~~~~~~~~~


Found 3 errors

Did I miss any steps? How can I help you diagnosticate the issue

Any help would be appreciated

@kaisalmen
Copy link
Collaborator

Hi @john-schmitz you have to run yarn install once on top level of the project on a fresh checkout. I can reproduce your problem if I don't do this. Once you do, the problem above disappears.

@CGNonofr
Copy link
Collaborator

CGNonofr commented Mar 3, 2022

I'm not familiar with yarn, but doesn't it mean the yarn.lock is broken?

@kaisalmen
Copy link
Collaborator

Good point. Something seems fishy here. I deleted the lock file and then did yarn install again and it had many more changes. I will push a new branch and open a PR once I am certain it works as expected.

@kaisalmen
Copy link
Collaborator

kaisalmen commented Mar 3, 2022

@CGNonofr with PR #318 @codingame/monaco-languageclient@^0.17.0 was removed from yarn.lock and it was not replaced by monaco-languageclient@^0.17.3 what does not seem logic, because the dependency is defined in both example and examples/browser. Even after manually removing the lock file and performing install in the project's root or the example the entry in the lock file does not come back.!? 🤷‍♂️

@kaisalmen
Copy link
Collaborator

The workaround mentioned above applies. I guess the build and dependency management needs some love (see #315).

@CGNonofr
Copy link
Collaborator

CGNonofr commented Mar 3, 2022

Since it's a yarn workspace, I don't think you should run yarn anywhere else than in the root (it's the case with npm workspace at least)

@kaisalmen
Copy link
Collaborator

kaisalmen commented Mar 3, 2022

Yes, I only did to see if I can provoke an effect. True, with npm workspace you should only install in the root, but there the installation of child dependencies works. The yarn issue must have something to do with self referencing the repo/package here

@john-schmitz
Copy link
Author

Thanks everyone! I was able to run the example correctly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants