Vue-material: installing 1.0.0-beta4 via npm results in error

Created on 17 Nov 2017  路  9Comments  路  Source: vuematerial/vue-material

Steps to reproduce

Attempted to install 1.0.0-beta4 via npm:

npm install vue-material@beta --save

Which browser?

Windows 10 with git bash, npm 3.10.10

What is expected?

Package should install

What is actually happening?

[email protected] postinstall C:\Users\taylo\dev\sketch\node_modules\vue-material
sh build/git-hooks/install.sh

sh: build/git-hooks/install.sh: No such file or directory

question

Most helpful comment

I'm also running into this issue when deploying via CI. npm install vue-material@beta --save works fine for installing the package locally, but when running npm install in my deployment process (with no node modules installed), the install fails because the vue-material's postinstall is trying to run the non-existent git-hook:

npm ERR! [email protected] postinstall: `sh build/git-hooks/install.sh`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'sh build/git-hooks/install.sh'.

EDIT:

I think the issue is with [email protected] as well as npm. When you run npm install vue-material@beta --save npm saves the version as ^1.0.0-beta-4 to your package.json. Then when you run something likerm -rf node_modules && npm install, npm evaluates ^1.0.0-beta-4 to 1.0.0 due to fuzzy versioning or something.

Removing the ^ from my package.json fixed the issue because npm will be forced to install 1.0.0-beta-4 instead of incorrectly installing 1.0.0

All 9 comments

I had the same error. I removed npm_modules several times and reinstalled it and at some point it works. Can't explain it.

FWIW, I have the same issue with the non-beta release (npm install [email protected] --save) on win 10 pro, node 8.1.3, npm 5.0.4, sh from https://sourceforge.net/projects/win-bash/files/. It still fails after multiple cycles of deletion of the node_modules folder and reinstallation. Thanks for your great work and thanks in advance for looking into this issue (if you decide to do so).

UPDATE:
Installing the beta-release (npm install vue-material@beta --save) works.

Yes, it's seem npm install vue-material@beta --save works.

Here a git to reproduce this issue: https://github.com/DarkIsDude/vue-material-docker.

Verified that running: npm install vue-material@beta --save worked after a frustrating amount of time of removing node_modules and doing fresh installs. Might be safe to close now.

I'm also running into this issue when deploying via CI. npm install vue-material@beta --save works fine for installing the package locally, but when running npm install in my deployment process (with no node modules installed), the install fails because the vue-material's postinstall is trying to run the non-existent git-hook:

npm ERR! [email protected] postinstall: `sh build/git-hooks/install.sh`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'sh build/git-hooks/install.sh'.

EDIT:

I think the issue is with [email protected] as well as npm. When you run npm install vue-material@beta --save npm saves the version as ^1.0.0-beta-4 to your package.json. Then when you run something likerm -rf node_modules && npm install, npm evaluates ^1.0.0-beta-4 to 1.0.0 due to fuzzy versioning or something.

Removing the ^ from my package.json fixed the issue because npm will be forced to install 1.0.0-beta-4 instead of incorrectly installing 1.0.0

Looks like @Anaphase found issue. I closing for now, if you get this issue again reopen it.

Just to carify some things npm is doing nothing wrong here. Thats because the version 1.0.0-beta-x will is the beta version of 1.0.0 . Therefor when installing it with somthing like ^1.0.0-beta-4 there the version 1.0.0 will alway be installed. When having a look at npm view vue-material you will see the version array:
[ '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.0.10', '0.0.11', '0.0.12', '0.0.13', '0.0.14', '0.0.15', '0.1.0', '0.1.1', '0.1.2', '0.2.0', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.5.0', '0.5.1', '0.5.2', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.8.0', '0.8.1', '1.0.0-beta-1', '1.0.0-beta-2', '1.0.0-beta-3', '1.0.0-beta-4', '1.0.0-beta-5', '1.0.0-beta-6', '1.0.0-beta-7', '1.0.0' ]
^ in front of an version number will always update to the the highes minor release.

so this should be fixable with using something like 1.0.1-beta-x as next version

For users who want to use the beta version, just remove the ^ like ^1.0.0-beta-7 -> 1.0.0-beta-7.

@Last-Order or just beta

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lovepluskaka picture lovepluskaka  路  3Comments

capttrousers picture capttrousers  路  3Comments

delueg picture delueg  路  3Comments

sergey-koretsky picture sergey-koretsky  路  3Comments

markus-s24 picture markus-s24  路  3Comments