Coder Social home page Coder Social logo

Comments (16)

David-Desmaisons avatar David-Desmaisons commented on July 19, 2024 1

Perfect!! It is time to go to bed for me now. Tomorrow I will commit the change and publish the fix.

from vue.draggable.

David-Desmaisons avatar David-Desmaisons commented on July 19, 2024

Hi @Rachelin, could you try to use replace the vuedragablefor.js on your project by the master vuedragablefor.js of this repo. I made some changes recently that may correct this problem. If this work, I will publish a new version.

from vue.draggable.

David-Desmaisons avatar David-Desmaisons commented on July 19, 2024

@Rachelin, try code from commit 1178d87.

from vue.draggable.

Rachelin avatar Rachelin commented on July 19, 2024

@David-Desmaisons I tried like you said that replaced the code, but i still can not build successfully.

from vue.draggable.

David-Desmaisons avatar David-Desmaisons commented on July 19, 2024

Hi @Rachelin , please try new npm package version (1.0.5), I made tests with Webpack and Browserify, and both worked. If the problems persist, please give me more details on your set-up and the error message. Thanks

from vue.draggable.

Rachelin avatar Rachelin commented on July 19, 2024

Hi, @David-Desmaisons , thanks for your help. I tried the new npm package version at 1.0.5, still failed again. Here is my details on set-up my project.

  1. install project by vue-cli
$ npm install -g vue-cli
$ vue init browserify my-project
$ cd my-project
$ npm install
$ npm run dev 
  1. install new package(cd my project)
    npm install [email protected] --save
  2. Use the package, copy this code to main.js
import Vue from 'vue'
import VueDragableFor from 'vuedragablefor'
Vue.use(VueDragableFor)
  1. When I run the project it tell me got error in http-sever then I changed the package.json (line 8)
    "serve": "http-server -c 1 -a localhost -p 3003",
  2. Do the script npm run build

Here is my error message:
43541dde-b540-4a98-b797-7d55af86954d

Error: Cannot find module 'vuedragablefor' from '/Users/wuxiaolian/vue-project/src'
    at /Users/wuxiaolian/vue-project/node_modules/resolve/lib/async.js:46:17
    at process (/Users/wuxiaolian/vue-project/node_modules/resolve/lib/async.js:173:43)
    at ondir (/Users/wuxiaolian/vue-project/node_modules/resolve/lib/async.js:188:17)
    at load (/Users/wuxiaolian/vue-project/node_modules/resolve/lib/async.js:69:43)
    at onex (/Users/wuxiaolian/vue-project/node_modules/resolve/lib/async.js:92:31)
    at /Users/wuxiaolian/vue-project/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:82:15)

Here is my package.json

{
  "name": "vue-project",
  "description": "A Vue.js project",
  "author": "Rachelin <[email protected]>",
  "private": true,
  "scripts": {
    "watchify": "watchify -vd -p browserify-hmr -e src/main.js -o dist/build.js",
    "serve": "http-server -c 1 -a localhost -p 3003",
    "dev": "npm-run-all --parallel watchify serve",
    "build": "cross-env NODE_ENV=production browserify -e src/main.js | uglifyjs -c warnings=false -m > dist/build.js",
    "lint": "eslint --ext .js,.vue src test/unit",
    "test": "karma start karma.conf.js"
  },
  "browserify": {
    "transform": [
      "vueify",
      "babelify"
    ]
  },
  "dependencies": {
    "vue": "^1.0.0",
    "vue-resource": "^0.9.3",
    "vue-router": "^0.7.13",
    "vuedragablefor": "^1.0.5"
  },
  "devDependencies": {
    "babel-core": "^6.0.0",
    "babel-plugin-transform-runtime": "^6.0.0",
    "babel-preset-es2015": "^6.0.0",
    "babel-preset-stage-2": "^6.0.0",
    "babel-runtime": "^6.0.0",
    "babelify": "^7.2.0",
    "browserify": "^12.0.1",
    "browserify-hmr": "^0.3.1",
    "cross-env": "^1.0.5",
    "eslint": "^1.10.3",
    "eslint-plugin-html": "^1.1.0",
    "http-server": "^0.9.0",
    "jasmine-core": "^2.4.1",
    "karma": "^0.13.15",
    "karma-browserify": "^4.4.2",
    "karma-jasmine": "^0.3.6",
    "karma-phantomjs-launcher": "^1.0.0",
    "karma-spec-reporter": "0.0.23",
    "npm-run-all": "^1.6.0",
    "phantomjs-prebuilt": "^2.1.3",
    "proxyquireify": "^3.0.1",
    "uglify-js": "^2.5.0",
    "vueify": "^8.5.2",
    "watchify": "^3.4.0"
  }
}

from vue.draggable.

David-Desmaisons avatar David-Desmaisons commented on July 19, 2024

@Rachelin

I was not abble to reproduce your issue. I follow the same steps and it worked fine:

Console:

$ npm install -g vue-cli
$ vue init browserify my-project
$ cd my-project
$ npm install
$ npm run dev 

Alteration on main.js:

image

Include of vuadragable for and build:

image

Did you try recrating your environment from scratch? If not, please try.

from vue.draggable.

Rachelin avatar Rachelin commented on July 19, 2024

@David-Desmaisons

I changed the vuedragablefor package.json, like this:

(Line-83)
"files": [
    "vuedragablefor.js"
  ],

(Line-95)
 "main": "vuedragablefor.js",

Removed the "//src" and move the vuedragablefor.js to vuedragablefor folder.
So it can find now.

But when i use the package, it told me another issue:
vuedragablefor.js:42 Uncaught TypeError: Cannot set property '__directive' of null

from vue.draggable.

David-Desmaisons avatar David-Desmaisons commented on July 19, 2024

@Rachelin Which OS are you using? I think the correct value should be src/fvuedragablefor.js,

from vue.draggable.

Rachelin avatar Rachelin commented on July 19, 2024

@David-Desmaisons
I using OS 10.10.5, and i got the value is src//vuedragablefor.js

from vue.draggable.

David-Desmaisons avatar David-Desmaisons commented on July 19, 2024

@Rachelin I am using a PC, this may explain the difference. Could you try src/vuedragablefor.js to see if it fixes the problem?

from vue.draggable.

Rachelin avatar Rachelin commented on July 19, 2024

96baefaa-e597-43bd-a335-5939f285cc0a

This is the original value

from vue.draggable.

David-Desmaisons avatar David-Desmaisons commented on July 19, 2024

Could you please try to manually change these values to: src/vuedragablefor.js? If this will solve the problem, I will update the package with the correct value.

from vue.draggable.

Rachelin avatar Rachelin commented on July 19, 2024

Yes , you are right , it works now!!!

from vue.draggable.

Rachelin avatar Rachelin commented on July 19, 2024

Thanks a lot , cheers

from vue.draggable.

David-Desmaisons avatar David-Desmaisons commented on July 19, 2024

Corrected in version 1.0.6

from vue.draggable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.