1. Files required from inside of the project root does find them (which I guess is because node_modules is in a parent directory to them). "go get %s: path %s is not a package in module rooted at %s""go get %s: can't request explicit version of path in main module" Running If an argument names a module but not a package (because there is noWith no package arguments, 'go get' applies to Go package in theIf you want to update the dependencies of all packages within a module, you want We probably do need a clearer error message for this case.The intent here is most likely to update dependencies for all packages in the main module, rather than the package at the root of the main module. The directory containing the go.mod file is called the module root. So, specifically if 1) Your message is much clearer than my comment's one that doesn't have a hint.Successfully merging a pull request may close this issue. If your project is already in version control, you can simply run Or you can supply module path manually.
go get -v broken after upgrade go1.13.0 If an argument names a module but not a package (because there is no Go source code in the module's root directory), then the install step is skipped for that argument, instead of causing a build failure. ModRoot ()) continue} } if path!= arg { base. The folder structure looks like this:
cmd/go: clarify error message for 'go get -u' without arguments in a module root that is not a package It’s kinda like a name, URL and import path for your package: This command will create go.mod file which both defines projects requirements and locks dependencies to their correct versions (to give you some analogy, it’s like package.json and package-lock.json rolled into one): Run go getto add a new dependency to your proj… GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.By clicking “Sign up for GitHub”, you agree to our Well, after investigation and the codebase is cmd/go/internal/modget/get.go:346 as the following:Successfully merging a pull request may close this issue. Typically the module root will also correspond to a source code repository root (but in general it need not). Part 1 — Using Go Modules(this post) 2. For example 'go get golang.org/x/perf' succeeds even though there This post is part 1 in a series. Errorf ("go get %s: path %s is not a package in module rooted at %s", arg, abs, modload. GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.By clicking “Sign up for GitHub”, you agree to our I'm working on a project that has no Go package in the root directory of the module. Errorf ("go get %s: can't request explicit version of path in main module", arg) continue} Part 4 — Go Modules: v2 and Beyond Go 1.11 and 1.12 include preliminarysupport for modules,Go’snew dependency management systemthat makes dependency version information explicitand easier to manage.This blog post is an introduction to the basic operations neededto get started using modules.
Part 3 — Publishing Go Modules 4. Part 2 — Migrating To Go Modules 3. However, the files imported from outside of the root does not find any modules from node_modules (React for example). I just get a Cannot resolve module 'React'. A module is a collection ofGo packagesstored in … The module is the set of all Go packages in the module root and its subdirectories, but excluding subtrees with their own go.mod files.