2

I'm running Ubuntu 14.x and a client's CMS in Vagrant (Laravel platform, if that is relevant). Please excuse the broadness of scope as working with packages and dependencies is new to me and makes my head swim, and I need to basically immerse myself in the concepts so I can understand them. That said, from the number of posts I see looks like other devs face the same challeges.

The README.md says to execute yarn to build everything after I've cloned the repo. Here are the commands that led up to that point:

which nodejs # /usr/bin/nodejs
nodejs -v # v4.7.3
npm install -g yarn #this installed yarn v0.19.1
yarn

I get the following sequence, each time I try and run yarn, I get the following errors. Interestingly, on the 2nd of 4 times I tried it referenced a different symlink, so sorry for the legth of this:

root@vagrant-ubuntu-trusty-64:/var/www/mycms# yarn
yarn install v0.19.1
warning mycms@0.0.1: No license field
warning mycms@0.0.1: "dependencies" has dependency "babel-polyfill" with range "^6.16.0" that collides with a dependency in "devDependencies" of the same name with version "^6.7.4"
warning mycms@0.0.1: "dependencies" has dependency "babel-preset-es2015" with range "^6.18.0" that collides with a dependency in "devDependencies" of the same name with version "^6.6.0"
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
error An unexpected error occurred: "EPROTO: protocol error, symlink '../../../babylon/bin/babylon.js' -> '/var/www/mycms/node_modules/babel-core/node_modules/.bin/babylon'".
info If you think this is a bug, please open a bug report with the information provided in "/var/www/mycms/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

root@vagrant-ubuntu-trusty-64:/var/www/mycms# yarn
yarn install v0.19.1
warning mycms@0.0.1: No license field
warning mycms@0.0.1: "dependencies" has dependency "babel-polyfill" with range "^6.16.0" that collides with a dependency in "devDependencies" of the same name with version "^6.7.4"
warning mycms@0.0.1: "dependencies" has dependency "babel-preset-es2015" with range "^6.18.0" that collides with a dependency in "devDependencies" of the same name with version "^6.6.0"
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
error An unexpected error occurred: "EPROTO: protocol error, symlink '../../../normalize-package-data/node_modules/semver/bin/semver' -> '/var/www/mycms/node_modules/accord/node_modules/.bin/semver'".
info If you think this is a bug, please open a bug report with the information provided in "/var/www/mycms/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

root@vagrant-ubuntu-trusty-64:/var/www/mycms# yarn
yarn install v0.19.1
warning mycms@0.0.1: No license field
warning mycms@0.0.1: "dependencies" has dependency "babel-polyfill" with range "^6.16.0" that collides with a dependency in "devDependencies" of the same name with version "^6.7.4"
warning mycms@0.0.1: "dependencies" has dependency "babel-preset-es2015" with range "^6.18.0" that collides with a dependency in "devDependencies" of the same name with version "^6.6.0"
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
error An unexpected error occurred: "EPROTO: protocol error, symlink '../../../babylon/bin/babylon.js' -> '/var/www/mycms/node_modules/babel-core/node_modules/.bin/babylon'".
info If you think this is a bug, please open a bug report with the information provided in "/var/www/mycms/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

root@vagrant-ubuntu-trusty-64:/var/www/mycms# yarn  # 
yarn install v0.19.1
warning mycms@0.0.1: No license field
warning mycms@0.0.1: "dependencies" has dependency "babel-polyfill" with range "^6.16.0" that collides with a dependency in "devDependencies" of the same name with version "^6.7.4"
warning mycms@0.0.1: "dependencies" has dependency "babel-preset-es2015" with range "^6.18.0" that collides with a dependency in "devDependencies" of the same name with version "^6.6.0"
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
error An unexpected error occurred: "EPROTO: protocol error, symlink '../../../babylon/bin/babylon.js' -> '/var/www/mycms/node_modules/babel-core/node_modules/.bin/babylon'".
info If you think this is a bug, please open a bug report with the information provided in "/var/www/mycms/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

I have two questions which I hope are concise:

  • How do I get rid of the mycms@0.0.1: No license field (and is this critical to do)?
  • How do I resolve the collision between dependencies and devDependencies? I'm working in a dev environment but obviously don't want to touch the yarn.lock(?) file.
  • If I used the greater of the two versions for both dependencies and devDependencies (providing this worked in the code), would this prevent this error message?
Aurora0001
  • 13,139
  • 5
  • 50
  • 53
Oliver Williams
  • 5,966
  • 7
  • 36
  • 78

1 Answers1

0

https://docs.npmjs.com/files/package.json#license will help you address the No license field error.

In regards to the differing dependencies, you should only need babel-polyfill and babel-preset-es2015 in the devDependencies section.

Keysox
  • 56
  • 2
  • 6