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

fail to add npm-asset/react #261

Closed
kiuka opened this issue Oct 25, 2016 · 4 comments
Closed

fail to add npm-asset/react #261

kiuka opened this issue Oct 25, 2016 · 4 comments
Assignees
Labels
Milestone

Comments

@kiuka
Copy link

kiuka commented Oct 25, 2016

Hello,

I tried to add npm-asset/react dependency, but I got the following error:

C:\Users\user\PhpstormProjects\test>composer require npm-asset/react
Using version ^15.3 for npm-asset/react
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your GitHub credentials are required to fetch private repository metadata (https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-flow)
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+DESKTOP-OC2FD2F+2016-10-25+1507
to retrieve a token. It will be stored in "C:/Users/user/AppData/Roaming/Composer/auth.json" for future use by Composer.
Token (hidden):
Token stored successfully.

Installation failed, reverting ./composer.json to its original content.

[UnexpectedValueException]
Invalid version string "0.8.0-SNAPSHOT"

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-sta
ble] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] []...

My dev environment:
Win 10

npm -v
3.10.8

git --version
git version 2.10.0.windows.1

composer --version
Composer version 1.2.1 2016-09-12 11:27:19

@schmunk42
Copy link
Contributor

You might try to exclude the version with

"extra": {
  "asset-pattern-skip-version": "(-build|-patch|-SNAPSHOT)",
}

@mathielen
Copy link

Unfortunately the problem still persists even with the pattern-skip directive. In my case I use:
"npm-asset/angular-ui-bootstrap": "2.4.0"

Which results into:

[UnexpectedValueException]
Invalid version string "2.5.0-SNAPSHOT"

on Ubuntu 16.10

npm -v
3.10.10

git --version
git version 2.7.4

composer --version
Composer version 1.3.1 2017-01-07 18:08:51

@francoispluchino
Copy link
Member

@schmunk42 The asset-pattern-skip-version is used after the package conversion. SNAPSHOT isn't converted for the moment.

@francoispluchino francoispluchino self-assigned this Feb 12, 2017
@francoispluchino francoispluchino added this to the 1.3.0 milestone Feb 12, 2017
@francoispluchino
Copy link
Member

Fixed by 69fd13c.

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

No branches or pull requests

4 participants