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

Yarn 1.0.0 has moved it's executable path from yarn/dist/bin/yarn to yarn/yarn-<version>/bin/yarn #647

Closed
mtraynham opened this issue Sep 7, 2017 · 20 comments

Comments

@mtraynham
Copy link
Contributor

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Fails to execute. target/node/yarn/dist/bin/yarn doesn't exist and the following maven error appears.

Cannot run program "target/node/yarn/dist/bin/yarn" (in directory "src/main/webapp"): error=2, No such file or directory

If the current behavior is a bug, please provide the steps to reproduce.

  1. Set yarnVersion to v1.0.0 in configuration
  2. Run yarn goal
  3. Inspect target/node/yarn directory for dist/bin/yarn
  4. Instead find bin/yarn

What is the expected behavior?
Runs yarn executable correctly (maybe through user config or version matching).

Please mention your frontend-maven-plugin and operating system version.
Plugin version: 1.3
Linux Mint 18.3

@choonchernlim
Copy link

By the way, here's the new yarn structure using v1.0.1... it applies to v1.0.0 too:-

➜  tree .
.
├── node
└── yarn
    └── yarn-v1.0.1
        ├── LICENSE
        ├── README.md
        ├── bin
        │   ├── yarn
        │   ├── yarn.cmd
        │   ├── yarn.js
        │   ├── yarnpkg
        │   └── yarnpkg.cmd
        ├── lib
        │   ├── cli.js
        │   └── v8-compile-cache.js
        └── package.json

@eirslett
Copy link
Owner

eirslett commented Sep 8, 2017

Sad!

@eirslett
Copy link
Owner

eirslett commented Sep 8, 2017

I would be open for a PR to this project that changes the path to yarn, and also a note in the CHANGELOG that the plugin only supports yarn >= 1.0.0.

@mtraynham mtraynham changed the title Yarn 1.0.0 has moved it's executable path from yarn/dist/bin/yarn to yarn/bin/yarn Yarn 1.0.0 has moved it's executable path from yarn/dist/bin/yarn to yarn/yarn-<version>/bin/yarn Sep 8, 2017
@mtraynham
Copy link
Contributor Author

mtraynham commented Sep 8, 2017

I can probably put that together. Just realized I was incorrect with my initial bug report. The new structure is actually target/node/yarn/yarn-<version>/bin/yarn as @choonchernlim pointed out . Actually, it may be better to unpack yarn-<version>/bin/yarn and move it to dist/bin/yarn (i.e. just renaming the yarn-<version> directory to dist) . That way, hypothetically, all current versions would still be supported.

@metame
Copy link

metame commented Sep 10, 2017

Any chance we can get this merged soonish ? :) please!

@eirslett
Copy link
Owner

Looks like Travis is still failing on the build... :-(

@mtraynham
Copy link
Contributor Author

mtraynham commented Sep 10, 2017

Could be related to Travis' issues with MacOS.

https://www.traviscistatus.com/

Kind of weird, the build shows:

Switching to Oracle JDK7 (java-7-oracle), JAVA_HOME will be set to /usr/lib/jvm/java-7-oracle
update-java-alternatives: directory does not exist: /usr/lib/jvm/java-7-oracle

@garmeeh
Copy link

garmeeh commented Sep 12, 2017

Should this be working on 1.5 with #648 merged? I am still getting:

Cannot run program "target/node/yarn/dist/bin/yarn" (in directory "src/main/webapp"): error=2, No such file or directory

@eirslett
Copy link
Owner

It's not released yet.

@sh33dafi
Copy link

Any eta on the release?

@eirslett
Copy link
Owner

Whenever I have time... (releasing to maven central is a chore, takes half an hour, and it makes my blood pressure rise to dangerous levels)
I know some people use https://jitpack.io/ with success, to run this plugin from a specific git commit rather than a release.

@Tcharl
Copy link

Tcharl commented Sep 13, 2017

Hi,

To ease the process of maven deployment, you can use a combination of maven scm-wagon configuration and transport, release-plugin, and pgp-maven: once configured correctly, it takes less than a minute to release on central (just release:prepare, release:perform and accept the staging);-).
An example here

Regards,

@eirslett
Copy link
Owner

eirslett commented Sep 13, 2017

Yes that's what I'm doing, but there's always something like GPG acting up (" Inappropriate ioctl for device"), tests failing, or I forget something in sonatype and the release is dropped :-P
Ideally I guess Travis should just do the release on every tag, or something.

@henjovr
Copy link

henjovr commented Sep 16, 2017

Sorry to bother you, but many people would really appreciate it if you could find the time to release on central.. Anything we can do to help?

@eirslett
Copy link
Owner

eirslett commented Sep 16, 2017

I would really love it if somebody could help me set up auto-publishing to some maven repository hosting, every time we git push with a release tag! Something automated, which means the project can be released much more often. I'd be happy to share credentials or whatever would be needed.

@rvowles
Copy link

rvowles commented Sep 18, 2017

do this:

                    <plugin>
                            <groupId>org.sonatype.plugins</groupId>
                            <artifactId>nexus-staging-maven-plugin</artifactId>
                            <version>1.6.7</version>
                            <extensions>true</extensions>
                            <configuration>
                                    <serverId>sonatype-nexus-staging</serverId>
                                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                            </configuration>
                    </plugin>

put it in a profile in your POM, say -Psonatype and then type

mvn -Psonatype --batch-mode release:prepare release:perform

and it will automatically build it and push it to Sonatype and release it to Central.

Then you just have to push it to your Github repo if it works.

Change 'sonatype-nexus-staging' to whatever you are using as your serverId for sonatype.

@eirslett
Copy link
Owner

Ok, I finally got time to release it now! I just had to tweak some environment variables related to som TTY in order to make the GPG sign command work. Should be synced to Central soon.

@ecostanzi
Copy link

Hi there any chance of seeing this issue released in v1.7? I see no activity since november. Lack of support or time? :)

@Tcharl
Copy link

Tcharl commented Mar 3, 2018

@ecostanzi , this issue is resolved...

@crashnick16
Copy link

it does not seem to work for me still, I am using version 1.6 of the plugin

WesleyRen pushed a commit to WesleyRen/frontend-maven-plugin that referenced this issue Aug 30, 2019
1. eirslett#504: Let user specify a custom location of yarn dist tar ball.
2. eirslett#647: copy installed /node/yarn/yarn-<version> to /node/yarn/dist for execution path.
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