Okay
  Public Ticket #1244817
Laravel 5.4 fresh | npm run dev | cross-env error
Closed

Comments

  • firesurf started the conversation

    Thank you for the great product, but i'm facing an issue:

    Running npm run dev leads to this error:

    Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-81-generic x86_64)
     * Documentation:  https://help.ubuntu.com
     * Management:     https://landscape.canonical.com
     * Support:        https://ubuntu.com/advantage
    3 packages can be updated.
    0 updates are security updates.
    Last login: Tue Jul 18 12:08:55 2017 from 10.0.2.2
    vagrant@homestead:~/Code/myproject$ npm run dev
    > @ dev /home/vagrant/Code/myproject
    > npm run development
    > @ development /home/vagrant/Code/myproject
    > cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress
    --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
     10% building modules 0/1 modules 1 active ...laravel-mix/src/builder/mock-entry
     10% building modules 1/2 modules 1 active ...laravel-mix/src/builder/mock-entry
     95% emitting
     DONE  Compiled successfully in 120ms                                 1:18:33 PM
    fs.js:1000
      binding.stat(pathModule._makeLong(path), statValues);
              ^
    Error: ENOENT: no such file or directory, stat '/home/vagrant/Code/myproject/resources/assets/vendors/simple-line-icons/css/simple-line-icons.css'
        at Error (native)
        at Object.fs.statSync (fs.js:1000:11)
        at Object.statSync (/home/vagrant/Code/myproject/node_modules/graceful-
    fs/polyfills.js:297:22)
        at Object.copySync (/home/vagrant/Code/myproject/node_modules/fs-extra/
    lib/copy-sync/copy-sync.js:31:86)
        at File.copyTo (/home/vagrant/Code/myproject/node_modules/laravel-mix/s
    rc/File.js:210:12)
        at FileCollection.copyTo (/home/vagrant/Code/myproject/node_modules/lar
    avel-mix/src/FileCollection.js:105:13)
        at src.forEach.file (/home/vagrant/Code/myproject/node_modules/laravel-
    mix/src/FileCollection.js:82:38)
        at Array.forEach (native)
        at FileCollection.copyTo (/home/vagrant/Code/myproject/node_modules/lar
    avel-mix/src/FileCollection.js:82:17)
        at CopyFilesTask.run (/home/vagrant/Code/myproject/node_modules/laravel
    -mix/src/tasks/CopyFilesTask.js:14:20)
        at CustomTasksPlugin.runTask (/home/vagrant/Code/myproject/node_modules
    /laravel-mix/src/plugins/CustomTasksPlugin.js:34:14)
        at Mix.tasks.forEach.task (/home/vagrant/Code/myproject/node_modules/la
    ravel-mix/src/plugins/CustomTasksPlugin.js:9:44)
        at Array.forEach (native)
        at Compiler.compiler.plugin.stats (/home/vagrant/Code/myproject/node_mo
    dules/laravel-mix/src/plugins/CustomTasksPlugin.js:9:23)
        at Compiler.applyPlugins (/home/vagrant/Code/myproject/node_modules/tap
    able/lib/Tapable.js:61:14)
        at emitRecords.err (/home/vagrant/Code/myproject/node_modules/webpack/l
    ib/Compiler.js:268:11)
        at Compiler.emitRecords (/home/vagrant/Code/myproject/node_modules/webp
    ack/lib/Compiler.js:375:38)
        at emitAssets.err (/home/vagrant/Code/myproject/node_modules/webpack/li
    b/Compiler.js:262:10)
        at applyPluginsAsyncSeries1.err (/home/vagrant/Code/myproject/node_modu
    les/webpack/lib/Compiler.js:368:12)
        at next (/home/vagrant/Code/myproject/node_modules/tapable/lib/Tapable.
    js:154:11)
        at Compiler.compiler.plugin (/home/vagrant/Code/myproject/node_modules/
    webpack/lib/performance/SizeLimitsPlugin.js:99:4)
        at Compiler.applyPluginsAsyncSeries1 (/home/vagrant/Code/myproject/node
    _modules/tapable/lib/Tapable.js:158:13)
        at Compiler.afterEmit (/home/vagrant/Code/myproject/node_modules/webpac
    k/lib/Compiler.js:365:9)
        at require.forEach.err (/home/vagrant/Code/myproject/node_modules/webpa
    ck/lib/Compiler.js:360:15)
        at /home/vagrant/Code/myproject/node_modules/async/dist/async.js:359:16
        at iteratorCallback (/home/vagrant/Code/myproject/node_modules/async/di
    st/async.js:935:13)
        at /home/vagrant/Code/myproject/node_modules/async/dist/async.js:843:16
        at /home/vagrant/Code/myproject/node_modules/graceful-fs/graceful-fs.js
    :43:10
        at FSReqWrap.oncomplete (fs.js:123:15)
    npm ERR! Linux 4.4.0-81-generic
    npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "development"
    npm ERR! node v6.11.1
    npm ERR! npm  v3.10.10
    npm ERR! code ELIFECYCLE
    npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin
    /webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/we
    bpack.config.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the @ development script 'cross-env NODE_ENV=development node
    _modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/
    laravel-mix/setup/webpack.config.js'.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the  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_modules/webpack/bin/webpack.js
    --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config
    .js
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR!     npm bugs
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR!     npm owner ls
    npm ERR! There is likely additional logging output above.
    npm ERR! Please include the following file with any support request:
    npm ERR!     /home/vagrant/Code/myproject/npm-debug.log
    npm ERR! Linux 4.4.0-81-generic
    npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "dev"
    npm ERR! node v6.11.1
    npm ERR! npm  v3.10.10
    npm ERR! code ELIFECYCLE
    npm ERR! @ dev: `npm run development`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the @ dev script 'npm run development'.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the  package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR!     npm run development
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR!     npm bugs
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR!     npm owner ls
    npm ERR! There is likely additional logging output above.
    npm ERR! Please include the following file with any support request:
    npm ERR!     /home/vagrant/Code/myproject/npm-debug.log
  •  32
    seenu replied

    Hello,

    at one part it shows compiled successfully so i assume most of it may be finished

    but it is not able to copy some files.

    can you check if site working properly or not?

    Also, can you try to update npm to latest version? (npm install npm -g)

  • firesurf replied

    Thank your for your time. I did the npm install npm -global but still getting this:

    vagrant@homestead:~/Code/myproject$ npm run dev
    > @ dev /home/vagrant/Code/myproject
    > npm run development
    > @ development /home/vagrant/Code/myproject
    > cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress
    --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
     10% building modules 0/1 modules 1 active ...laravel-mix/src/builder/mock-entry
     10% building modules 1/2 modules 1 active ...laravel-mix/src/builder/mock-entry
     95% emitting
     DONE  Compiled successfully in 123ms                                 5:32:35 PM
    fs.js:1000
      binding.stat(pathModule._makeLong(path), statValues);
              ^
    Error: ENOENT: no such file or directory, stat '/home/vagrant/Code/myproject/resources/assets/vendors/simple-line-icons/css/simple-line-icons.css'
        at Error (native)
        at Object.fs.statSync (fs.js:1000:11)
        at Object.statSync (/home/vagrant/Code/myproject/node_modules/graceful-
    fs/polyfills.js:297:22)
        at Object.copySync (/home/vagrant/Code/myproject/node_modules/fs-extra/
    lib/copy-sync/copy-sync.js:31:86)
        at File.copyTo (/home/vagrant/Code/myproject/node_modules/laravel-mix/s
    rc/File.js:210:12)
        at FileCollection.copyTo (/home/vagrant/Code/myproject/node_modules/lar
    avel-mix/src/FileCollection.js:105:13)
        at src.forEach.file (/home/vagrant/Code/myproject/node_modules/laravel-
    mix/src/FileCollection.js:82:38)
        at Array.forEach (native)
        at FileCollection.copyTo (/home/vagrant/Code/myproject/node_modules/lar
    avel-mix/src/FileCollection.js:82:17)
        at CopyFilesTask.run (/home/vagrant/Code/myproject/node_modules/laravel
    -mix/src/tasks/CopyFilesTask.js:14:20)
        at CustomTasksPlugin.runTask (/home/vagrant/Code/myproject/node_modules
    /laravel-mix/src/plugins/CustomTasksPlugin.js:34:14)
        at Mix.tasks.forEach.task (/home/vagrant/Code/myproject/node_modules/la
    ravel-mix/src/plugins/CustomTasksPlugin.js:9:44)
        at Array.forEach (native)
        at Compiler.compiler.plugin.stats (/home/vagrant/Code/myproject/node_mo
    dules/laravel-mix/src/plugins/CustomTasksPlugin.js:9:23)
        at Compiler.applyPlugins (/home/vagrant/Code/myproject/node_modules/tap
    able/lib/Tapable.js:61:14)
        at emitRecords.err (/home/vagrant/Code/myproject/node_modules/webpack/l
    ib/Compiler.js:268:11)
        at Compiler.emitRecords (/home/vagrant/Code/myproject/node_modules/webp
    ack/lib/Compiler.js:375:38)
        at emitAssets.err (/home/vagrant/Code/myproject/node_modules/webpack/li
    b/Compiler.js:262:10)
        at applyPluginsAsyncSeries1.err (/home/vagrant/Code/myproject/node_modu
    les/webpack/lib/Compiler.js:368:12)
        at next (/home/vagrant/Code/myproject/node_modules/tapable/lib/Tapable.
    js:154:11)
        at Compiler.compiler.plugin (/home/vagrant/Code/myproject/node_modules/
    webpack/lib/performance/SizeLimitsPlugin.js:99:4)
        at Compiler.applyPluginsAsyncSeries1 (/home/vagrant/Code/myproject/node
    _modules/tapable/lib/Tapable.js:158:13)
        at Compiler.afterEmit (/home/vagrant/Code/myproject/node_modules/webpac
    k/lib/Compiler.js:365:9)
        at require.forEach.err (/home/vagrant/Code/myproject/node_modules/webpa
    ck/lib/Compiler.js:360:15)
        at /home/vagrant/Code/myproject/node_modules/async/dist/async.js:359:16
        at iteratorCallback (/home/vagrant/Code/myproject/node_modules/async/di
    st/async.js:935:13)
        at /home/vagrant/Code/myproject/node_modules/async/dist/async.js:843:16
        at /home/vagrant/Code/myproject/node_modules/graceful-fs/graceful-fs.js
    :43:10
        at FSReqWrap.oncomplete (fs.js:123:15)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin
    /webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/we
    bpack.config.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the @ development script.
    npm ERR! This is probably not a problem with npm. There is likely additional log
    ging output above.
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/vagrant/.npm/_logs/2017-07-18T17_32_35_857Z-debug.log
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! @ dev: `npm run development`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the @ dev script.
    npm ERR! This is probably not a problem with npm. There is likely additional log
    ging output above.
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/vagrant/.npm/_logs/2017-07-18T17_32_35_890Z-debug.log
  •  32
    seenu replied

    Hello,

    it says, its not able to find

    Error: ENOENT: no such file or directory, stat '/home/vagrant/Code/myproject/resources/assets/vendors/simple-line-icons/css/simple-line-icons.css'
    


    simple-line-icons but infact they should be copied when you run bower install

    so can you try running `bower install` again and then run `npm run dev` ?

    thanks

  • firesurf replied

    Thank you very much. You were right! Running bower install fixed it. Maybe the first time something went wrong.

    Great service! 

  •  32
    seenu replied

    Glad to know that