BRACKETS-by-TRIAD / craftable

Admin panel builder / CRUD generator for Laravel.
https://getcraftable.com
MIT License
984 stars 192 forks source link

Errors after: npm run development #8

Closed maxi032 closed 6 years ago

maxi032 commented 6 years ago

First, I want to thank you for this great admin app I have npm vnode -v5.5.1 node 6.10.3 on XAMPP

After I do: npm run development It processses 45% and then I get an error like

ERROR in ./resources/assets/admin/js/profile/edit-password/Form.js
Module not found: Error: Can't resolve '../components/Form/AppForm' in 'C:\xampp\htdocs\testingcraftable\resources\assets\admin\js\profile\edit-password'
resolve '../components/Form/AppForm' in 'C:\xampp\htdocs\testingcraftable\resources\assets\admin\js\profile\edit-password'
  using description file: C:\xampp\htdocs\testingcraftable\package.json (relative path: ./resources/assets/admin/js/profile/edit-password)
    Field 'browser' doesn't contain a valid alias configuration

To enable more detailed error messagess add --display-error-details in package.json at the end of line 5

Wipsly commented 6 years ago

I have the same error.

matejminar commented 6 years ago

Hey, we have made a major overhaul of the frontend assets in the latest release and moved base components(along with other frontend stuff) into npm package. Please check it out and give us info if your problem still persists. Closing for now.

maxi032 commented 6 years ago

Tryed again: $ npm run development

@ development C:\wamp64\www\blogcraftable cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

95% emitting ERROR Failed to compile with 18 errors12:16:07
These dependencies were not found:

matejminar commented 6 years ago

Are you trying it on existing project, or have you run craftable new myProjectName today? Do you have craftable version 2.0?

maxi032 commented 6 years ago

yes, I used craftable new project today... after that: npm install and: npm run development

matejminar commented 6 years ago

can you show me contents of your package.json and webpack.mix.js please?

maxi032 commented 6 years ago

package.json:


    "private": true,
    "scripts": {
        "dev": "npm run development",
        "development": "cross-env NODE_ENV=development node_modules\/webpack\/bin\/webpack.js --progress --hide-modules --config=node_modules\/laravel-mix\/setup\/webpack.config.js",
        "watch": "cross-env NODE_ENV=development node_modules\/webpack\/bin\/webpack.js --watch --progress --hide-modules --config=node_modules\/laravel-mix\/setup\/webpack.config.js",
        "watch-poll": "npm run watch -- --watch-poll",
        "hot": "cross-env NODE_ENV=development node_modules\/webpack-dev-server\/bin\/webpack-dev-server.js --inline --hot --config=node_modules\/laravel-mix\/setup\/webpack.config.js",
        "prod": "npm run production",
        "production": "cross-env NODE_ENV=production node_modules\/webpack\/bin\/webpack.js --no-progress --hide-modules --config=node_modules\/laravel-mix\/setup\/webpack.config.js"
    },
    "devDependencies": {
        "axios": "^0.17",
        "bootstrap-sass": "^3.3.7",
        "cross-env": "^5.1",
        "jquery": "^3.2",
        "laravel-mix": "^1.0",
        "lodash": "^4.17.4",
        "vue": "^2.5.7",
        "craftable": "^1.0.0"
    }
}

webpack.mix.js:

let mix = require('laravel-mix');

mix.js('resources/assets/js/app.js', 'public/js')
   .sass('resources/assets/sass/app.scss', 'public/css');

mix.js(['resources/assets/admin/js/admin.js'], 'public/build/admin/js')
    .sass('resources/assets/admin/scss/app.scss', 'public/build/admin/css');

if (mix.inProduction()) {
    mix.version();
}
            
maxi032 commented 6 years ago

Update: I have decided to give it another try on Homestead and it worked so it doesn't work as expected on windows (wamp) In my Homestead box I have node v8.0 and npm v5.0 Before getting it to work I had the following issue:

npm install 
could not find the lodash package so I deleted the folder node_modules entirely and then tried with yarn:
yarn install
Installation went without problems. Then:
npm run dev
compiled all the assets
matejminar commented 6 years ago

ok, nice! glad that you could make it work.. we will test it on some windows machines seeing it is a windows specific problem