avored / laravel-ecommerce

AvoRed an Open Source Laravel Shopping Cart
https://avored.com
1.52k stars 549 forks source link

error when call "npm run dev" #454

Closed fredchantp closed 4 years ago

fredchantp commented 4 years ago

Describe the bug 圖片

To Reproduce Steps to reproduce the behavior:

  1. Follow the guide in this page: https://avored.com/docs/user/installation
  2. npm install
  3. composer install
  4. "npm run dev" or "npm run watch"
  5. Get error

Version: npm: 6.1.14 avored framework: 3.0.16 laravel: 6.18.35 nodejs:12.16.2 running on window platform

indpurvesh commented 4 years ago

Sorry this path was the development folder path. Will remove it in the next release. If you want to just update the path so it will work.

Below is the code that suppose to go into webpack.mix.js

const mix = require('laravel-mix')
const tailwindcss = require('tailwindcss')
require('laravel-mix-alias')

// console.log(process.env.APP_URL)
let url = process.env.APP_URL.replace(/(^\w+:|^)\/\//, '')
mix.options({
   hmrOptions: {
       host: url,
       port: 8081
   }
})

mix.alias({'@': 'resources/js'})

/******** AVORED ADMIN JS  **********/
mix.js('resources/js/avored.js', 'js/avored.js')
    // .extract(['vue', 'ant-design-vue'])

mix.js('resources/js/app.js', 'js/app.js')

/******** AVORED COPY IMAGES  **********/
mix.copyDirectory('resources/images', 'public/images')

mix.sass('resources/sass/tailwind.scss', 'css/app.css')
.options({
    processCssUrls: false,
    postCss: [ tailwindcss('tailwind.config.js') ],
})
fredchantp commented 4 years ago

Thanks.. But I got other error.. and I found composer create-project --prefer-dist avored/laravel-ecommerce will get the 3.05 version I am trying 3.0.11 now.

indpurvesh commented 4 years ago

Ideally as composer works it should always download the latest available version. It could be something to do with packagist.org service? Other reason i am assuming now is that because its 3.05 instead of 3.0.5 the reason behind its download the 3.05 instead of 3.0.11. Never mind next release i will bump up the version number to 3.1.0 which will fixed that issue.

In the mean time you can simply call

composer create-project --prefer-dist avored/laravel-ecommerce:3.0.11