therealklanni / bower-migrate

Migrate packages from bower.json to package.json
10 stars 0 forks source link

not working #22

Open HansHammel opened 8 years ago

HansHammel commented 8 years ago

i put my bower.json and package.json into a tmp folder and run bower-migrate but nothing happend except the package.json file changed it's date.

greetings

therealklanni commented 8 years ago

What version of node/npm? Also, can you paste the contents of your bower.json here?

kohenkatz commented 8 years ago

I have the same issue. Here is my bower.json:

{
  "name": "mycompany-myproject",
  "version": "1.0.0",
  "description": "",
  "main": "",
  "moduleType": [],
  "license": "PRIVATE",
  "homepage": "",
  "private": true,
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "tests"
  ],
  "dependencies": {
    "bootbox.js": "bootbox#~4.4.0",
    "jquery-timeago": "~1.5.3",
    "select2": "~4.0.1",
    "sweetalert": "~1.1.3",
    "bootstrap": "~3.3.6",
    "fetch": "~1.0.0",
    "font-awesome": "~4.6.3",
    "jquery": "~2.2.4",
    "knockout": "knockoutjs#~3.4.0",
    "plupload": "~2.1.8",
    "moment": "^2.14.1",
    "ladda": "^1.0.0",
    "ko-component-router": "kohenkatz/ko-component-router#kohenkatz-fix-pipeline",
    "crypto-js": "^3.1.6",
    "jshashes": "^1.0.5",
    "wildemitter": "HenrikJoreteg/wildemitter#use-umd-instead-of-only-NodeJS-export",
    "bootstrap-sass": "^3.3.6",
    "bootstrap-material-design": "^0.5.9",
    "flow.js": "^2.10.1",
    "jwt-decode": "^2.0.1",
    "leaflet": "^0.7.7",
    "font-awesome-animation": "^0.0.9",
    "leaflet.markercluster": "^0.5.0",
    "my-private-package": "git@my-private-git-server.example.com:core-components/my-private-package.git#v1.5.3",
    "moment-timezone": "^0.5.4",
    "knockstrap": "^1.3.2",
    "parsleyjs": "^2.4.3",
    "alertifyjs": "MohammadYounes/AlertifyJS#1.7.1",
    "jstimezonedetect": "https://bitbucket.org/pellepim/jstimezonedetect/get/1.0.6.zip",
    "mockconsole": "HenrikJoreteg/mockconsole",
    "webrtc-adapter-test": "webrtc/adapter#v1.4.0",
    "webrtcsupport": "HenrikJoreteg/webrtcsupport",
    "getusermedia": "^1.0.0",
    "rtcpeerconnection": "^5.2.0"
  }
  "resolutions": {
    "jquery": "~2.1.4"
  }
}

Versions:

Node v5.6.0 NPM v3.8.3

therealklanni commented 8 years ago

@kohenkatz thanks. Are you getting any errors? Do you know if any of those Bower packages exist in npm under the same name?

This isn't a very sophisticated tool, it simply tries to copy the bower.json entries to package.json. It doesn't check if they exist in npm or anything like that. If that is the problem you're having, then just remove the entries from package.json that don't work. If not (i.e. you're actually getting an error), then let me know.

All it's supposed to do is copy entries over, the rest is up to you to figure out. If you want it to do more, I'm happy to accept a PR adding features. :)

kohenkatz commented 8 years ago

I get no error message, and (as @HansHammel originally described), nothing is added to package.json but the file's Date Modified is changed.

therealklanni commented 8 years ago

OK, something might be failing silently. I will look into this ASAP. Thanks for the extra details.

mirelm commented 6 years ago

I am having the same issue. I have a bower.json and one already existing package.json. When I run bower migrate, nothing copies over. I only get one new entry in my package.json. Which is the name-entry. But none of the dependencies or anything moved over. npm: '5.5.1' node: '8.6.0'

CNSKnight commented 6 years ago

Make sure that your (likely virgin) package.json includes "dependencies": {} and "devDependencies": {} properties before attempting $ bower-migrate

gwenf commented 6 years ago

This worked great for me using node v9.5.0 and npm v5.7.1.