gazben / laravel-vue-admin

Laravel integration with vue-admin
35 stars 17 forks source link

error running when running php artisan build:dev #3

Open Dave3of5 opened 7 years ago

Dave3of5 commented 7 years ago

[ErrorException] file_get_contents(/home/ubuntu/workspace/resources/assets/frontend/dist/index.html): failed to open stream: No such file or directory

PHP 5.6.30

gazben commented 7 years ago

This happens, when the webpack build fails. Did any other error message turn up during the execution?

Dave3of5 commented 7 years ago

Sorry yes a few:

php artisan build:install

installing frontend dependencies
npm

WARN unmet dependency /home/ubuntu/workspace/resources/assets/frontend/node_modules/plotly.js/node_modules/gl-plot3d/node_modules/gl-select-static/node_modules/cwise/node_modules/static-module/node_modules/concat-stream requires readable-stream@'~1.1.9' but will load

npm WARN unmet dependency /home/ubuntu/workspace/resources/assets/frontend/node_modules/plotly.js/node_modules/gl-plot3d/node_modules/gl-select-static/node_modules/cwise/node_modules/static-module/node_modules/readable-stream,
npm WARN unmet dependency which is version 1.0.34

npm WARN unmet dependency /home/ubuntu/workspace/resources/assets/frontend/node_modules/plotly.js/node_modules/gl-plot3d/node_modules/gl-select-static/node_modules/cwise/node_modules/static-module/node_modules/duplexer2 requires readable-stream@'~1.1.9' but will load
npm WARN 
unmet dependency /home/ubuntu/workspace/resources/assets/frontend/node_modules/plotly.js/node_modules/gl-plot3d/node_modules/gl-select-static/node_modules/cwise/node_modules/static-module/node_modules/readable-stream,
npm WARN unmet dependency which is version 1.0.34

npm WARN unmet dependency
 /home/ubuntu/workspace/resources/assets/frontend/node_modules/plotly.js/node_modules/gl-plot3d/node_modules/gl-select-static/node_modules/cwise/node_modules/static-module/node_modules/static-eval requires escodegen@'~0.0.24' but will load
npm WARN unmet dependency /home/ubuntu/workspace/resources/assets/frontend/node_modules/plotly.js/node_modules/gl-plot3d/node_modules/gl-select-static/node_modules/cwise/node_modules/static-module/node_modules/escodegen,
npm WARN unmet dependency which is version 1.3.3

Then:

php artisan build:install

installing frontend dependencies
npm

WARN unmet dependency /home/ubuntu/workspace/resources/assets/frontend/node_modules/plotly.js/node_modules/gl-plot3d/node_modules/gl-select-static/node_modules/cwise/node_modules/static-module/node_modules/concat-stream requires readable-stream@'~1.1.9' but will load

npm WARN unmet dependency /home/ubuntu/workspace/resources/assets/frontend/node_modules/plotly.js/node_modules/gl-plot3d/node_modules/gl-select-static/node_modules/cwise/node_modules/static-module/node_modules/readable-stream,
npm WARN unmet dependency which is version 1.0.34

npm WARN unmet dependency /home/ubuntu/workspace/resources/assets/frontend/node_modules/plotly.js/node_modules/gl-plot3d/node_modules/gl-select-static/node_modules/cwise/node_modules/static-module/node_modules/duplexer2 requires readable-stream@'~1.1.9' but will load
npm WARN 
unmet dependency /home/ubuntu/workspace/resources/assets/frontend/node_modules/plotly.js/node_modules/gl-plot3d/node_modules/gl-select-static/node_modules/cwise/node_modules/static-module/node_modules/readable-stream,
npm WARN unmet dependency which is version 1.0.34

npm WARN unmet dependency
 /home/ubuntu/workspace/resources/assets/frontend/node_modules/plotly.js/node_modules/gl-plot3d/node_modules/gl-select-static/node_modules/cwise/node_modules/static-module/node_modules/static-eval requires escodegen@'~0.0.24' but will load
npm WARN unmet dependency /home/ubuntu/workspace/resources/assets/frontend/node_modules/plotly.js/node_modules/gl-plot3d/node_modules/gl-select-static/node_modules/cwise/node_modules/static-module/node_modules/escodegen,
npm WARN unmet dependency which is version 1.3.3

dave3of5:~/workspace (master) $ php artisan build:dev
Building frontend

> vue-admin@0.1.12 build-dev /home/ubuntu/workspace/resources/assets/frontend
> cross-env NODE_ENV=development node build/build.dev.js

module.js:327
    throw err;
    ^

Error: Cannot find module 'chalk'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/ubuntu/workspace/resources/assets/frontend/build/check-versions.js:3:15)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)

npm
 ERR!
 Linux 4.9.17-c9

npm 
ERR! argv "/home/ubuntu/.nvm/versions/node/v4.7.3/bin/node" "/home/ubuntu/.nvm/versions/node/v4.7.3/bin/npm" "run" "build-dev"

npm
 ERR! node v4.7.3

npm ERR! npm  v2.15.11

npm ERR! code
 ELIFECYCLE
npm ERR! vue-admin@0.1.12 build-dev: `cross-env NODE_ENV=development node build/build.dev.js`
npm 
ERR! Exit status 1
npm ERR!

npm ERR! Failed at the vue-admin@0.1.12 build-dev script 'cross-env NODE_ENV=development node build/build.dev.js'.

npm ERR! This is most likely a problem with the vue-admin package,
npm 
ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:

npm ERR!     cross-env NODE_ENV=development node build/build.dev.js
npm ERR!
 You can get information on how to open an issue for this project with:
npm ERR!     npm bugs vue-admin
npm 
ERR!
 Or if that isn't available, you can get their info via:

npm ERR! 
npm ERR!
     npm owner ls vue-admin
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ubuntu/workspace/resources/assets/frontend/npm-debug.log

Linking..
Creating symlink. Target: /home/ubuntu/workspace/resources/assets/frontend/dist/assets/css Link: /home/ubuntu/workspace/public/assets/css
Symlink creation skipped. Target exists: false Link exists: false
Creating symlink. Target: /home/ubuntu/workspace/resources/assets/frontend/dist/assets/img Link: /home/ubuntu/workspace/public/assets/img
Symlink creation skipped. Target exists: false Link exists: false
Creating symlink. Target: /home/ubuntu/workspace/resources/assets/frontend/dist/assets/js Link: /home/ubuntu/workspace/public/assets/js
Symlink creation skipped. Target exists: false Link exists: false
Creating symlink. Target: /home/ubuntu/workspace/resources/assets/frontend/dist/assets/fonts Link: /home/ubuntu/workspace/public/assets/fonts
Symlink creation skipped. Target exists: false Link exists: false
Creating symlink. Target: /home/ubuntu/workspace/resources/assets/frontend/dist/logo.png Link: /home/ubuntu/workspace/public/logo.png
Symlink creation skipped. Target exists: false Link exists: false
Creating symlink. Target: /home/ubuntu/workspace/resources/assets/frontend/dist/app.js Link: /home/ubuntu/workspace/public/app.js
Symlink creation skipped. Target exists: false Link exists: false
Creating symlink. Target: /home/ubuntu/workspace/resources/assets/frontend/dist/vendor.js Link: /home/ubuntu/workspace/public/vendor.js
Symlink creation skipped. Target exists: false Link exists: false

  [ErrorException]                                                                                                                       
  file_get_contents(/home/ubuntu/workspace/resources/assets/frontend/dist/index.html): failed to open stream: No such file or directory  
gazben commented 7 years ago

Hi,

Try upgrading your node and npm.

Dave3of5 commented 7 years ago

To what version you don't say a minimum version anywhere?

gazben commented 7 years ago

Delete the resources/assets/frontend/node_modules folder, and try it with the latest node version (7.x) it should work. The minimum version stated in the vue-admin package is 4.0 but I don't think thats enough.