Comments (10)
A fresh zsh
also works fine, as does a fresh install of oh-my-zsh, getting closer ...
Bah ... https://github.com/npm/npm/releases/tag/v5.4.1
It was an issue with npm
all along. Updated to npm v5.4.1 and all is well!
Shells only come into play because the system-installed copy of npm
was older than the nvs/nvm copy which was v5.4.0 and broken :(
from pact-mock-service-npm.
@jokeyrhyme I can't reproduce this. Here is my output.
bethtest $ npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help json` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
package name: (bethtest)
version: (1.0.0)
description:
entry point: (index.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to /Users/bethanyskurrie/workspace/pact-foundation/bethtest/package.json:
{
"name": "bethtest",
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
Is this ok? (yes) yes
bethtest $ npm install @pact-foundation/pact-mock-service
> [email protected] install /Users/bethanyskurrie/workspace/pact-foundation/bethtest/node_modules/dtrace-provider
> node scripts/install.js
> @pact-foundation/[email protected] postinstall /Users/bethanyskurrie/workspace/pact-foundation/bethtest/node_modules/@pact-foundation/pact-mock-service
> node ./src/check-dependencies.js
[2017-09-05T23:14:39.546Z] INFO: [email protected]/40825 on Bethbook-Work-3.local: Platform specific dependency '@pact-foundation/pact-mock-service-darwin' installed successful
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
+ @pact-foundation/[email protected]
added 25 packages in 26.004s
bethtest $ node_modules/\@pact-foundation/pact-mock-service-darwin/bin/pact-mock-service --help
Commands:
pact-mock-service.rb control # Run a Pact mock service control server.
pact-mock-service.rb control-restart # Start a Pact mock service control server.
pact-mock-service.rb control-start # Start a Pact mock service control server.
pact-mock-service.rb control-stop # Stop a Pact mock service control server.
pact-mock-service.rb help [COMMAND] # Describe available commands or one specific command
pact-mock-service.rb restart # Start or restart a mock service. If the consumer, provider and pact-dir options...
pact-mock-service.rb service # Start a mock service. If the consumer, provider and pact-dir options are provid...
pact-mock-service.rb start # Start a mock service. If the consumer, provider and pact-dir options are provid...
pact-mock-service.rb stop -p, --port=PORT # Stop a Pact mock service
pact-mock-service.rb version # Show the pact-mock-service gem version
from pact-mock-service-npm.
@bethesque thanks for the response and your steps to reproduce!
I'm still getting different results, so let's see if it's something to do with my system / environment / machine / cosmic rays ...
$ uname -a
Darwin rfw.office.atlassian.com 17.0.0 Darwin Kernel Version 17.0.0: Thu Aug 24 22:01:05 PDT 2017; root:xnu-4570.1.46~3/RELEASE_X86_64 x86_64
$ node --version
v8.4.0
$ npm --version
5.4.0
$ zsh --version
zsh 5.3 (x86_64-apple-darwin17.0)
This is a MacBook with running the High Sierra 10.13 Beta (17A360a) and APFS, but some of my coworkers are having similar issues and they aren't silly enough to run non-stable software :P
So, my steps to reproduce (sorry for not including these before) ...
$ mkdir -p ~/Projects/pacttest
$ cd ~/Projects/pacttest
$ npm init -y
Wrote to /Users/rwaldon/Projects/pacttest/package.json:
{
"name": "pacttest",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "Ron Waldon <[email protected]> (https://github.com/jokeyrhyme)",
"license": "ISC"
}
$ npm install @pact-foundation/pact-mock-service
> [email protected] install /Users/rwaldon/Projects/pacttest/node_modules/dtrace-provider
> node scripts/install.js
> @pact-foundation/[email protected] postinstall /Users/rwaldon/Projects/pacttest/node_modules/@pact-foundation/pact-mock-service
> node ./src/check-dependencies.js
[2017-09-06T06:32:43.386Z] INFO: [email protected]/62292 on rfw.office.atlassian.com: Platform specific dependency '@pact-foundation/pact-mock-service-darwin' installed successful
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @pact-foundation/[email protected] (node_modules/@pact-foundation/pact-mock-service-linux-ia32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @pact-foundation/[email protected]: wanted {"os":"linux","arch":"ia32"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @pact-foundation/[email protected] (node_modules/@pact-foundation/pact-mock-service/node_modules/@pact-foundation/pact-mock-service-linux-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @pact-foundation/[email protected]: wanted {"os":"linux","arch":"x64"} (current: {"os":"darwin","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @pact-foundation/[email protected] (node_modules/@pact-foundation/pact-mock-service/node_modules/@pact-foundation/pact-mock-service-win32):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @pact-foundation/[email protected]: wanted {"os":"win32","arch":"x64,ia32"} (current: {"os":"darwin","arch":"x64"})
+ @pact-foundation/[email protected]
added 26 packages in 15.819s
So far, so good, but here's where I start to diverge...
$ node_modules/@pact-foundation/pact-mock-service-darwin/bin/pact-mock-service --help
zsh: no such file or directory: node_modules/@pact-foundation/pact-mock-service-darwin/bin/pact-mock-service
$ ls node_modules/@pact-foundation/pact-mock-service-darwin
ls: node_modules/@pact-foundation/pact-mock-service-darwin: No such file or directory
$ node_modules/@pact-foundation/pact-mock-service/node_modules/@pact-foundation/pact-mock-service-darwin/bin/pact-mock-service --help
node_modules/@pact-foundation/pact-mock-service/node_modules/@pact-foundation/pact-mock-service-darwin/bin/pact-mock-service: line 25: /Users/rwaldon/Projects/pacttest/node_modules/@pact-foundation/pact-mock-service/node_modules/@pact-foundation/pact-mock-service-darwin/lib/ruby/bin/ruby: Permission denied
$ ls -lA node_modules/@pact-foundation/pact-mock-service/node_modules/@pact-foundation/pact-mock-service-darwin/lib/ruby/bin
total 56
-rw-r--r-- 1 rwaldon staff 163 14 Jul 2015 bundle
-rw-r--r-- 1 rwaldon staff 164 14 Jul 2015 bundler
-rw-r--r-- 1 rwaldon staff 160 14 Jul 2015 gem
-rw-r--r-- 1 rwaldon staff 160 14 Jul 2015 irb
-rw-r--r-- 1 rwaldon staff 161 14 Jul 2015 rake
-rw-r--r-- 1 rwaldon staff 139 14 Jul 2015 ruby
-rw-r--r-- 1 rwaldon staff 1149 14 Jul 2015 ruby_environment
$ ls -lA node_modules/@pact-foundation/pact-mock-service/node_modules/@pact-foundation/pact-mock-service-darwin/lib/ruby/bin.real
total 5456
-rw-r--r-- 1 rwaldon staff 508 14 Jul 2015 bundle
-rw-r--r-- 1 rwaldon staff 509 14 Jul 2015 bundler
-rw-r--r-- 1 rwaldon staff 558 14 Jul 2015 gem
-rw-r--r-- 1 rwaldon staff 202 14 Jul 2015 irb
-rw-r--r-- 1 rwaldon staff 501 14 Jul 2015 nokogiri
-rw-r--r-- 1 rwaldon staff 523 14 Jul 2015 posix-spawn-benchmark
-rw-r--r-- 1 rwaldon staff 485 14 Jul 2015 puma
-rw-r--r-- 1 rwaldon staff 488 14 Jul 2015 pumactl
-rw-r--r-- 1 rwaldon staff 487 14 Jul 2015 rackup
-rw-r--r-- 1 rwaldon staff 1256 14 Jul 2015 rake
-rw-r--r-- 1 rwaldon staff 505 14 Jul 2015 redcarpet
-rw-r--r-- 1 rwaldon staff 501 14 Jul 2015 redcloth
-rw-r--r-- 1 rwaldon staff 2730476 14 Jul 2015 ruby
-rw-r--r-- 1 rwaldon staff 485 14 Jul 2015 thin
-rw-r--r-- 1 rwaldon staff 497 14 Jul 2015 unicorn
-rw-r--r-- 1 rwaldon staff 503 14 Jul 2015 unicorn_rails
It seems as though I don't even end up with the same directory structure that you end up with. Could this be the extra flattening that npm 3.x and onwards does versus npm 2.x ? Or the change to the flattening algorithm in npm 5.x ?
PS. handy hint: you can use npm init -y
to create a package.json without asking any questions (just uses the default answers) :)
from pact-mock-service-npm.
$ npm -version
5.0.3
$ node --version
v8.1.2
$ uname -a
Darwin redacted.local 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
Full disclaimer - I am not a node-spert! My npm version does seem a likely candidate for the differences in our package structure. @mefellows or @mboudreau will probably know more about that. Can either of you reproduce @jokeyrhyme's issue?
from pact-mock-service-npm.
Hard to reproduce as I'm on Linux, but I'll look at what flags are being set on the executable before being packaged just to be sure. The fact that we haven't heard anything from anyone about this issue tells me that this is a configuration/usage issue. @jokeyrhyme Is it possible that your company is using an npm mirror instead of going straight to npmjs?
from pact-mock-service-npm.
@mboudreau we don't use a pass through cache / mirror of any kind for public packages, but I'll double check to make sure
from pact-mock-service-npm.
@jokeyrhyme I've downloaded the tarball (path can be found through npm show @pact-foundation/pact-mock-service-darwin
) and extracted it.
Here's the output I get when I do ls -al
in the bin directory for ruby:
total 92
drwxrwxr-x 2 mboudreau mboudreau 4096 Sep 7 10:59 .
drwxrwxr-x 6 mboudreau mboudreau 4096 Sep 7 10:59 ..
-rwxr-xr-x 1 mboudreau mboudreau 163 Jul 14 2015 bundle
-rwxr-xr-x 1 mboudreau mboudreau 164 Jul 14 2015 bundler
-rwxr-xr-x 1 mboudreau mboudreau 160 Jul 14 2015 gem
-rwxr-xr-x 1 mboudreau mboudreau 160 Jul 14 2015 irb
-rwxr-xr-x 1 mboudreau mboudreau 161 Jul 14 2015 rake
-rwxr-xr-x 1 mboudreau mboudreau 139 Jul 14 2015 ruby
-rwxr-xr-x 1 mboudreau mboudreau 1149 Jul 14 2015 ruby_environment
As you can see, it's got executable permission to all groups (owner, group and other). Can I please ask you to do the same as I did and see if you get the same results as me, then post your results? Thanks.
from pact-mock-service-npm.
$ curl -O https://registry.npmjs.org/@pact-foundation/pact-mock-service-darwin/-/pact-mock-service-darwin-2.1.0.tgz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8498k 100 8498k 0 0 2850k 0 0:00:02 0:00:02 --:--:-- 2850k
~/Downloads
$ tar zxf pact-mock-service-darwin-2.1.0.tgz
$ ls -lA package/lib/ruby/bin
total 56
-rwxr-xr-x 1 rwaldon staff 163 14 Jul 2015 bundle
-rwxr-xr-x 1 rwaldon staff 164 14 Jul 2015 bundler
-rwxr-xr-x 1 rwaldon staff 160 14 Jul 2015 gem
-rwxr-xr-x 1 rwaldon staff 160 14 Jul 2015 irb
-rwxr-xr-x 1 rwaldon staff 161 14 Jul 2015 rake
-rwxr-xr-x 1 rwaldon staff 139 14 Jul 2015 ruby
-rwxr-xr-x 1 rwaldon staff 1149 14 Jul 2015 ruby_environment
$ ls -lA package/lib/ruby/bin.real
total 5456
-rwxr-xr-x 1 rwaldon staff 508 14 Jul 2015 bundle
-rwxr-xr-x 1 rwaldon staff 509 14 Jul 2015 bundler
-rwxr-xr-x 1 rwaldon staff 558 14 Jul 2015 gem
-rwxr-xr-x 1 rwaldon staff 202 14 Jul 2015 irb
-rwxr-xr-x 1 rwaldon staff 501 14 Jul 2015 nokogiri
-rwxr-xr-x 1 rwaldon staff 523 14 Jul 2015 posix-spawn-benchmark
-rwxr-xr-x 1 rwaldon staff 485 14 Jul 2015 puma
-rwxr-xr-x 1 rwaldon staff 488 14 Jul 2015 pumactl
-rwxr-xr-x 1 rwaldon staff 487 14 Jul 2015 rackup
-rwxr-xr-x 1 rwaldon staff 1256 14 Jul 2015 rake
-rwxr-xr-x 1 rwaldon staff 505 14 Jul 2015 redcarpet
-rwxr-xr-x 1 rwaldon staff 501 14 Jul 2015 redcloth
-rwxr-xr-x 1 rwaldon staff 2730476 14 Jul 2015 ruby
-rwxr-xr-x 1 rwaldon staff 485 14 Jul 2015 thin
-rwxr-xr-x 1 rwaldon staff 497 14 Jul 2015 unicorn
-rwxr-xr-x 1 rwaldon staff 503 14 Jul 2015 unicorn_rails
Okay, I'm satisfied that the tarball is correct, however, it's still very puzzling to me.
Ha! Okay, @benbarclay suggested that it might be something my shell interpreter (or my profile) is doing, and that seems to be the case! A completely vanilla bash
works fine, but my over-customised zsh
does not.
When I narrow this down I'll let you know :)
from pact-mock-service-npm.
from pact-mock-service-npm.
from pact-mock-service-npm.
Related Issues (10)
- node_modules/.bin/pact-mock-service does not work HOT 1
- NPM Versions doesn't conform to semantic versioning HOT 3
- Post install script fail when using private npm proxy which require authenication HOT 4
- Cannot stop the mock service on windows HOT 1
- Mac standalone giving issues when a different version of ruby is installed HOT 53
- Update to pact mock service 0.12.0 HOT 6
- Does not work on alpine linux HOT 10
- Can we replace separate verifier and mock service standalone packages with the joint one? HOT 1
- is this deprecated? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pact-mock-service-npm.