Меню

Ошибка npm run dev

I have next errors output running npm command for my laravel 5.6 with bootstrap project:

$ npm run dev

> @ dev /mnt/_work_sdb8/wwwroot/lar/B4test
> npm run development


> @ development /mnt/_work_sdb8/wwwroot/lar/B4test
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

sh: 1: cross-env: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @ development: `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! spawn ENOENT
npm ERR! 
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/serge/.npm/_logs/2018-04-25T10_54_37_776Z-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 logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/serge/.npm/_logs/2018-04-25T10_54_37_794Z-debug.log

File /home/serge/.npm/_logs/2018-04-25T10_54_37_776Z-debug.log has:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'development' ]
2 info using npm@6.0.0
3 info using node@v9.11.1
4 verbose run-script [ 'predevelopment', 'development', 'postdevelopment' ]
5 info lifecycle @~predevelopment: @
6 info lifecycle @~development: @
7 verbose lifecycle @~development: unsafe-perm in lifecycle true
8 verbose lifecycle @~development: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/mnt/_work_sdb8/wwwroot/lar/B4test/node_modules/.bin:/usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/mnt/_work_sdb8/wwwroot/lar/B4test/node_modules/.bin:/home/serge/.composer/vendor/bin:/home/serge/.composer/vendor/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:~/.composer/vendor/bin
9 verbose lifecycle @~development: CWD: /mnt/_work_sdb8/wwwroot/lar/B4test
10 silly lifecycle @~development: Args: [ '-c',
10 silly lifecycle   'cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js' ]
11 info lifecycle @~development: Failed to exec development script
12 verbose stack Error: @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
12 verbose stack spawn ENOENT
12 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack     at ChildProcess.emit (events.js:180:13)
12 verbose stack     at maybeClose (internal/child_process.js:936:16)
12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
13 verbose pkgid @
14 verbose cwd /mnt/_work_sdb8/wwwroot/lar/B4test
15 verbose Linux 4.13.0-38-generic
16 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "development"
17 verbose node v9.11.1
18 verbose npm  v6.0.0
19 error file sh
20 error code ELIFECYCLE
21 error errno ENOENT
22 error syscall spawn
23 error @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
23 error spawn ENOENT
24 error Failed at the @ development script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

In composer.json :

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": "^7.1.3",
        "fideloper/proxy": "^4.0",
        "laravel/framework": "5.6.*",
        "components/highlightjs": "^9.12",
        "doctrine/dbal": "^2.6",
        "intervention/image": "^2.4",
        "laracasts/utilities": "^3.0",
        "laravel/tinker": "~1.0",
        "nwidart/laravel-modules": "^3.0",
        "pusher/pusher-php-server": "^3.0",
        "spatie/laravel-backup": "^5.1",
        "wboyz/laravel-enum": "^0.2.1"
    },
    "require-dev": {
        "filp/whoops": "^2.0",
        "fzaninotto/faker": "^1.7",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^2.0",
        "phpunit/phpunit": "^7.0",
        "barryvdh/laravel-debugbar": "^3.1",
        "laravel/dusk": "~3.0"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "App\": "app/",
            "Modules\": "Modules/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\": "tests/"
        }
    },
    "extra": {
        "laravel": {
            "dont-discover": [
            ]
        }
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r "file_exists('.env') || copy('.env.example', '.env');""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate"
        ],
        "post-autoload-dump": [
            "Illuminate\Foundation\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

In 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": "npm run development -- --watch",
        "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.18",
        "bootstrap": "^4.0.0",
        "popper.js": "^1.12",
        "cross-env": "^5.1",
        "jquery": "^3.2",
        "laravel-mix": "^2.0",
        "lodash": "^4.17.4",
        "vue": "^2.5.7",
        "vue-template-compiler": "^2.5.16",
        "vue2-collapse": "^1.0.11"
    },
    "dependencies": {
        "element-ui": "^2.3.6",
        "font-awesome": "^4.7.0",
        "fullcalendar": "^3.9.0",
        "highlight.js": "^9.12.0",
        "laravel-echo": "^1.3.5",
        "marked": "^0.3.19",
        "pusher-js": "^4.2.2",
        "v-toaster": "^1.0.3",
        "vee-validate": "^2.0.6",
        "vee-validate-laravel": "^1.0.1",
        "vue-bootstrap-datetimepicker": "^4.1.3",
        "vue-chat-scroll": "^1.2.1",
        "vue-fullcalendar": "^1.0.9",
        "vue-js-popover": "^1.1.7",
        "vue-moment": "^3.2.0",
        "vue-mouse-menu": "^1.1.0",
        "vue-nl2br": "0.0.5",
        "vue-notify-me": "^1.1.0",
        "vue-popperjs": "^1.2.6",
        "vue-router": "^3.0.1",
        "vue-select": "^2.4.0",
        "vue-simple-calendar": "^2.2.0",
        "vue-timeago": "^3.4.4",
        "vuejs-datepicker": "^0.9.29"
    }
}

Can you give a hint what could raize an error and how to fix it ?

Some error in config files or what?

Thank you very much!

npm install —save-dev webpack webpack-cli webpack-dev-server

увы все равно выдает ошибку( сделала по новой вот весь мой путь в терминале((( на сколько эта ошибка критична в дальнейшей работе?

Женя@DESKTOP-2O5UR37 MINGW64 ~/Desktop/webpacktest
$ npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

See npm help init for definitive documentation on these fields
and exactly what they do.

Use npm install <pkg> afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
package name: (webpacktest)
version: (1.0.0)
description: my template
entry point: (index.js)
test command: test
git repository:
keywords:
author: Markova
license: (ISC) MIT
About to write to C:UsersЖеняDesktopwebpacktestpackage.json:

{
«name»: «webpacktest»,
«version»: «1.0.0»,
«description»: «my template»,
«main»: «index.js»,
«scripts»: {
«test»: «test»
},
«author»: «Markova»,
«license»: «MIT»
}

Is this OK? (yes)

Женя@DESKTOP-2O5UR37 MINGW64 ~/Desktop/webpacktest
$ npm install —save-dev webpack webpack-cli webpack-dev-server
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is
known to be problematic. See https://v8.dev/blog/math-random for details.
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_moduleschokidarnode_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {«os»:»darwin»,»arch»:»any»} (current: {«os»:»win32″,»arch»:»x64″})
npm WARN webpacktest@1.0.0 No repository field.

  • webpack-dev-server@3.11.2
  • webpack-cli@4.7.0
  • webpack@5.38.1
    added 493 packages from 321 contributors and audited 494 packages in 31.692s

27 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

Женя@DESKTOP-2O5UR37 MINGW64 ~/Desktop/webpacktest
$ npm install path
npm WARN webpacktest@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {«os»:»darwin»,»arch»:»any»} (current: {«os»:»win32″,»arch»:»x64″})

  • path@0.12.7
    added 4 packages from 2 contributors and audited 498 packages in 3.954s

27 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

Женя@DESKTOP-2O5UR37 MINGW64 ~/Desktop/webpacktest
$ npm run dev

webpacktest@1.0.0 dev C:UsersЖеняDesktopwebpacktest
webpack-dev-server —open —mode development

internal/modules/cjs/loader.js:888
throw err;
^

Error: Cannot find module ‘webpack-cli/bin/config-yargs’
Require stack:

  • C:UsersЖеняDesktopwebpacktestnode_moduleswebpack-dev-serverbinwebpack-dev-server.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object. (C:UsersЖеняDesktopwebpacktestnode_moduleswebpack-dev-serverbinwebpack-dev-server.js:65:1)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
    code: ‘MODULE_NOT_FOUND’,
    requireStack: [
    ‘C:UsersЖеняDesktopwebpacktestnode_moduleswebpack-dev-serverbinwebpack-dev-server.js’
    ]
    }
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! webpacktest@1.0.0 dev: webpack-dev-server --open --mode development
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the webpacktest@1.0.0 dev script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:UsersЖеняAppDataRoamingnpm-cache_logs2021-05-29T10_36_52_294Z-debug.log

Post Views: 52

Error:-

> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

[webpack-cli] Error: Unknown option '--hide-modules'
[webpack-cli] Run 'webpack --help' to see available commands and options
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ development: `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! Exit status 2
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:UsersCotocus5AppDataRoamingnpm-cache_logs21-08-12T12_23_56_189Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:UsersCotocus5AppDataRoamingnpm-cache_logs21-08-12T12_23_56_273Z-debug.log

Solution:-

Step 1:- Run this command to verify cache

npm cache verify

Step 2:- Recheck your package.json and webpack.mix.js file it is correct or not.

Step 3:- Then Delete the Node Module file which is present in your project folder.

Step 4:- Run the Npm install command.

npm install

Step 5:- Then Run npm run dev command.

npm run dev
  • Author
  • Recent Posts

Tagged : npm / NPM error / npm error issue / npm run dev issue / npm run dev problem

За последние 24 часа нас посетили 9016 программистов и 810 роботов. Сейчас ищет 331 программист …


  1. ubunta2

    [ БАН ]

    С нами с:
    27 июн 2017
    Сообщения:
    947
    Симпатии:
    28

    1. > @ development /var/www/html
    2. > cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js —progress —hide-modules —config=node_modules/laravel-mix/setup/webpack.config.js
    3. sh: 1: cross-env: not found
    4. npm ERR! Linux 5.0.0-29-generic
    5. npm ERR! argv «/usr/bin/node» «/usr/bin/npm» «run» «development»
    6. npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js —progress —hide-modules —config=node_modules/laravel-mix/setup/webpack.config.js`
    7. 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’.
    8. npm ERR! Make sure you have the latest version of node.js and npm installed.
    9. npm ERR! If you do, this is most likely a problem with the  package,
    10. npm ERR! not with npm itself.
    11. npm ERR! Tell the author that this fails on your system:
    12. 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
    13. npm ERR! You can get information on how to open an issue for this project with:
    14. npm ERR! Or if that isn’t available, you can get their info via:
    15. npm ERR! There is likely additional logging output above.
    16. npm ERR! Please include the following file with any support request:
    17. npm ERR!     /var/www/html/npm-debug.log
    18. npm ERR! Linux 5.0.0-29-generic
    19. npm ERR! argv «/usr/bin/node» «/usr/bin/npm» «run» «dev»
    20. npm ERR! @ dev: `npm run development`
    21. npm ERR! Failed at the @ dev script ‘npm run development’.
    22. npm ERR! Make sure you have the latest version of node.js and npm installed.
    23. npm ERR! If you do, this is most likely a problem with the  package,
    24. npm ERR! not with npm itself.
    25. npm ERR! Tell the author that this fails on your system:
    26. npm ERR!     npm run development
    27. npm ERR! You can get information on how to open an issue for this project with:
    28. npm ERR! Or if that isn’t available, you can get their info via:
    29. npm ERR! There is likely additional logging output above.
    30. npm ERR! Please include the following file with any support request:
    31. npm ERR!     /var/www/html/npm-debug.log


  2. MouseZver

    С нами с:
    1 апр 2013
    Сообщения:
    7.561
    Симпатии:
    1.284
    Адрес:
    Лень

    Просто автоматом накуй. Зачем лезешь туда, если ты даже читать не умеешь, собственно — ниКуя ?

  3. Убунта, мне вот просто интересно — что такого делаешь с системой что у тебя постоянно вылазят ошибки?


  4. ubunta2

    [ БАН ]

    С нами с:
    27 июн 2017
    Сообщения:
    947
    Симпатии:
    28

    1.  npm install —global cross-env
    2. npm WARN checkPermissions Missing write access to /usr/local/lib
    3.     ├─┬ shebang-command@1.2.0
    4.     │ └── shebang-regex@1.0.0
    5. npm ERR! Linux 5.0.0-29-generic
    6. npm ERR! argv «/usr/bin/node» «/usr/bin/npm» «install» «—global» «cross-env»
    7. npm ERR! path /usr/local/lib
    8. npm ERR! Error: EACCES: permission denied, access ‘/usr/local/lib’
    9. npm ERR!  { Error: EACCES: permission denied, access ‘/usr/local/lib’
    10. npm ERR!   syscall: ‘access’,
    11. npm ERR!   path: ‘/usr/local/lib’ }
    12. npm ERR! Please try running this command again as root/Administrator.
    13. npm ERR! Please include the following file with any support request:
    14. npm ERR!     /var/www/html/npm-debug.log
    1.  npm install —global cross-env
    2. npm WARN checkPermissions Missing write access to /usr/local/lib
    3.     ├─┬ shebang-command@1.2.0
    4.     │ └── shebang-regex@1.0.0
    5. npm ERR! Linux 5.0.0-29-generic
    6. npm ERR! argv «/usr/bin/node» «/usr/bin/npm» «install» «—global» «cross-env»
    7. npm ERR! path /usr/local/lib
    8. npm ERR! Error: EACCES: permission denied, access ‘/usr/local/lib’
    9. npm ERR!  { Error: EACCES: permission denied, access ‘/usr/local/lib’
    10. npm ERR!   syscall: ‘access’,
    11. npm ERR!   path: ‘/usr/local/lib’ }
    12. npm ERR! Please try running this command again as root/Administrator.
    13. npm ERR! Please include the following file with any support request:
    14. npm ERR!     /var/www/html/npm-debug.log


  5. vvas

    С нами с:
    9 апр 2018
    Сообщения:
    50
    Симпатии:
    10

    @ubunta2 покажи что выводит на командыи ещёПоследнюю надо сделать в папке с проектом. Покажешь и я смогу тебе дать подсказки.


  6. ubunta2

    [ БАН ]

    С нами с:
    27 июн 2017
    Сообщения:
    947
    Симпатии:
    28

    whoami
    php
    — Добавлено —
    echo $PATH
    /var/www/html/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
    — Добавлено —

    1.     «dev»: «npm run development»,
    2.     «development»: «cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js —progress —hide-modules —config=node_modules/laravel-mix/setup/webpack.config.js»,
    3.     «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»,
    4.     «watch-poll»: «npm run watch — —watch-poll»,
    5.     «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»,
    6.     «prod»: «npm run production»,
    7.     «production»: «cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js —progress —hide-modules —config=node_modules/laravel-mix/setup/webpack.config.js»
    8.     «bootstrap-sass»: «^3.3.7»,


  7. ubunta2

    [ БАН ]

    С нами с:
    27 июн 2017
    Сообщения:
    947
    Симпатии:
    28

    1.     ├─┬ shebang-command@1.2.0
    2.     │ └── shebang-regex@1.0.0

    — Добавлено —
    which node
    /usr/bin/node


  8. ubunta2

    [ БАН ]

    С нами с:
    27 июн 2017
    Сообщения:
    947
    Симпатии:
    28

    1. npm WARN deprecated extract-text-webpack-plugin@3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
    2. npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.


  9. artoodetoo

    Команда форума
    Модератор

    С нами с:
    11 июн 2010
    Сообщения:
    10.820
    Симпатии:
    1.173
    Адрес:
    там-сям

    вот так не надо делать! теперь каталог node_packages принадлежит руту. жди проблем.
    можно только глобальные пакеты ставить через sudo.

    npm install без доп. ключей читает твой package.json и устанавливает локальные для проекта пакеты. твой проект весь целиком должен принадлежать аккаунту, под которым трудится веб-сервер. т.е. www-data (или php это зависит от твоих настроек), а не root. по крайней мере пока ты не перестанешь быть обезъяной. давай ты научишся обходиться без гранаты.


  10. ubunta2

    [ БАН ]

    С нами с:
    27 июн 2017
    Сообщения:
    947
    Симпатии:
    28

    а как мне делать я все пробую что нахожу в интернете
    если нет кто объяснит как сделать

    ДА НЕУЖЕЛИ!!! ПРЯМ НИКТО НЕ ОБЪЯСНЯЕТ, БРОСИЛИ ТЕБЯ НА ПРОИЗВОЛ. ЛОВИ ШТРАФ ЗА НЕБЛАГОДАРНУЮ ЛОЖЬ. БАН НЕ ЗА ГОРАМИ.

    — Добавлено —

    может удалить теперь его
    — Добавлено —

    1. npm WARN checkPermissions Missing write access to /var/www/html/node_modules
    2. │   └─┬ shebang-command@1.2.0
    3. │     └── shebang-regex@1.0.0
    4. ├─┬ imagemin-gifsicle@5.2.0
    5. │ │   └── cross-spawn@5.1.0
    6. │     │ ├─┬ buffer-to-vinyl@1.1.0
    7. │     │ │ └── file-type@3.9.0
    8. │     │ ├─┬ decompress-tarbz2@3.1.0
    9. │     │ │ └─┬ seek-bzip@1.0.5
    10. │     │ │   └─┬ commander@2.8.1
    11. │     │ │     └── graceful-readlink@1.0.1
    12. │     │ └─┬ decompress-unzip@3.4.0
    13. │     │     ├── buffer-crc32@0.2.13
    14. │       │ ├── strip-outer@1.0.1
    15. │       │ └── trim-repeated@1.0.0
    16. │         ├── is-retry-allowed@1.2.0
    17. │         ├── lowercase-keys@1.0.1
    18. │         └── url-parse-lax@1.0.0
    19. ├─┬ imagemin-mozjpeg@7.0.0
    20. │ │ └─┬ imagemin-pngquant@5.1.0
    21. │ │   └─┬ pngquant-bin@4.0.0
    22. │ │     │ ├─┬ decompress@4.2.0
    23. │ │     │ │ ├── decompress-tar@4.1.1
    24. │ │     │ │ ├─┬ decompress-tarbz2@4.1.1
    25. │ │     │ │ │ ├── file-type@6.2.0
    26. │ │     │ │ │ └─┬ unbzip2-stream@1.3.3
    27. │ │     │ │ │   └── buffer@5.4.3
    28. │ │     │ │ ├── decompress-targz@4.1.1
    29. │ │     │ │ ├─┬ decompress-unzip@4.0.1
    30. │ │     │ │ │ ├── file-type@3.9.0
    31. │ │     │ │ │ └── get-stream@2.3.1
    32. │ │     │ │ └─┬ strip-dirs@2.1.0
    33. │ │     │ │   └── is-natural-number@4.0.1
    34. │ │     │ │ │ ├─┬ get-proxy@2.1.0
    35. │ │     │ │ │ │ └─┬ npm-conf@1.1.3
    36. │ │     │ │ │ │   └─┬ config-chain@1.1.12
    37. │ │     │ │ │ │     └── proto-list@1.2.4
    38. │ │     │ │ │ ├─┬ isurl@1.0.0
    39. │ │     │ │ │ │ ├─┬ has-to-string-tag-x@1.4.1
    40. │ │     │ │ │ │ │ └── has-symbol-support-x@1.4.2
    41. │ │     │ │ │ │ └── is-object@1.0.1
    42. │ │     │ │ │ ├── tunnel-agent@0.6.0
    43. │ │     │ │ │ └── url-to-options@1.0.1
    44. │ │     │ │ ├─┬ ext-name@5.0.0
    45. │ │     │ │ │ ├── ext-list@2.2.2
    46. │ │     │ │ │ └── sort-keys-length@1.0.1
    47. │ │     │ │ ├── file-type@5.2.0
    48. │ │     │ │ ├─┬ filenamify@2.1.0
    49. │ │     │ │ │ └── filename-reserved-regex@2.0.0
    50. │ │     │ │ ├── get-stream@3.0.0
    51. │ │     │ │ │ ├─┬ decompress-response@3.3.0
    52. │ │     │ │ │ │ └── mimic-response@1.0.1
    53. │ │     │ │ │ ├── duplexer3@0.1.4
    54. │ │     │ │ │ ├── get-stream@3.0.0
    55. │ │     │ │ │ ├── p-cancelable@0.3.0
    56. │ │     │ │ │ └── timed-out@4.0.1
    57. │ │     │ │ ├─┬ p-event@1.3.0
    58. │ │     │ │ │ └── p-timeout@1.2.1
    59. │ │     │ │ ├── cross-spawn@5.1.0
    60. │ │     │ │ └── get-stream@3.0.0
    61. │ │     │ └─┬ p-map-series@1.0.0
    62. │ │       ├── cross-spawn@6.0.5
    63. │       └─┬ load-json-file@2.0.0
    64. │ │ └─┬ read-pkg-up@1.0.1
    65. │ │     ├─┬ load-json-file@1.1.0
    66. npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
    67. npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9
    68. npm WARN optional Skipping failed optional dependency /watchpack/chokidar/fsevents:
    69. npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9
    70. npm WARN optional Skipping failed optional dependency /webpack-dev-server/chokidar/fsevents:
    71. npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9
    72. npm WARN ajv-keywords@3.4.1 requires a peer of ajv@^6.9.1 but none was installed.
    73. npm ERR! Linux 5.0.0-29-generic
    74. npm ERR! argv «/usr/bin/node» «/usr/bin/npm» «install»
    75. npm ERR! path /var/www/html/node_modules
    76. npm ERR! Error: EACCES: permission denied, access ‘/var/www/html/node_modules’
    77. npm ERR!  { Error: EACCES: permission denied, access ‘/var/www/html/node_modules’
    78. npm ERR!   syscall: ‘access’,
    79. npm ERR!   path: ‘/var/www/html/node_modules’ }
    80. npm ERR! Please try running this command again as root/Administrator.
    81. npm ERR! Please include the following file with any support request:
    82. npm ERR!     /var/www/html/npm-debug.log


  11. artoodetoo

    Команда форума
    Модератор

    С нами с:
    11 июн 2010
    Сообщения:
    10.820
    Симпатии:
    1.173
    Адрес:
    там-сям

    насколько я вижу, у тебя cross-env установлен локально. проблема только в том, что он не находится в пути (path). варианты решения могут быть разные.

    например ты можешь отредактировать package.json так, чтобы явно обращаться к локальному пакету.

    или прочитать и понять как использовать локальные пакеты всегда через npx. найди здесь слово «автофоллбек«
    https://medium.com/devschacht/introducing-npx-an-npm-package-runner-a72a658cd9e6

    — Добавлено —

    ты как лялька, которая всё в рот тащит, что на земле найдёт. пора уже завершить этот этап в жизни и действовать осознанно.


  12. ubunta2

    [ БАН ]

    С нами с:
    27 июн 2017
    Сообщения:
    947
    Симпатии:
    28

    объясняют, но когда уже поздно

    ЛОВИ ЕЩЁ ШТРАФ.
    — Добавлено —
    да помогают на форуме, но я пока не все понимаю
    — Добавлено —
    Когда возникает проблема у меня нет кто поможет и решаю что нахожу в интернете. пока тема висит и за это время делаю ошибки


  13. artoodetoo

    Команда форума
    Модератор

    С нами с:
    11 июн 2010
    Сообщения:
    10.820
    Симпатии:
    1.173
    Адрес:
    там-сям

    значит всё что ты делаешь без sudo создаёт файлы, принадлежашие пользователю с именем php. проверь это вызываятак файлы выводятся с дополнительными аттрибутами

    теперь надо узнать: под каким пользователем работает apache. а если у тебя nginx и php-fpm , то проверь под каким пользователем php-fpm. я тебе показывал что и где искать.

    обычно это www-data. но проверь. почему это важно:
    потому что кое-что сайт пытается записать на диск. и если вдруг нужный каталог принадлежит другому пользователю, то произойдёт ошибка.

    расскажи чему ты научился только что своими словами.
    — Добавлено —

    смотри: есть несколько папок, разделенные двоеточием. когда ты набираешь какую-нибудь команду, например «cross-env», система последовательно ищет такой исполняемый файл в каждой из этих папок. и иногда не находит, потому что нужный файл лежит в другом месте.

    понял? расскажи что ты понял. приведи пример. приготовь $15.


  14. ubunta2

    [ БАН ]

    С нами с:
    27 июн 2017
    Сообщения:
    947
    Симпатии:
    28

    ls -l
    итого 52
    -rw-r—r— 1 php php 8980 сен 26 15:17 examples.desktop
    drwxr-xr-x 10 php php 4096 сен 29 08:22 node_modules
    drwxr-xr-x 6 php php 4096 сен 29 09:01 snap
    drwxr-xr-x 2 php php 4096 сен 26 15:28 Видео
    drwxr-xr-x 2 php php 4096 сен 26 15:28 Документы
    drwxr-xr-x 3 php php 4096 сен 28 19:41 Загрузки
    drwxr-xr-x 2 php php 4096 сен 27 14:14 Изображения
    drwxr-xr-x 2 php php 4096 сен 26 15:28 Музыка
    drwxr-xr-x 2 php php 4096 сен 26 15:28 Общедоступные
    drwxr-xr-x 4 php php 4096 сен 27 20:28 ‘Рабочий стол’
    drwxr-xr-x 2 php php 4096 сен 26 15:28 Шаблоны
    — Добавлено —
    я так понял нужно узнать под пользователем администратор или нет. У меня везде php — . Означает что все остальное под администратором и это мешает
    — Добавлено —
    смотри: есть несколько папок, разделенные двоеточием. когда ты набираешь какую-нибудь команду, например «cross-env», система последовательно ищет такой исполняемый файл в каждой из этих папок. и иногда не находит, потому что нужный файл лежит в другом месте.

    Значит файл лежит в другой папке
    — Добавлено —
    npm WARN checkPermissions Missing write access to /var/www/html/node_modules

    npm ERR! Please try running this command again as root/Administrator.

    там администратор


  15. artoodetoo

    Команда форума
    Модератор

    С нами с:
    11 июн 2010
    Сообщения:
    10.820
    Симпатии:
    1.173
    Адрес:
    там-сям

    я не понял твою мысль :D но мне кажется ты вывернул всё наизнанку.
    и ещё, очевидно ты вывел содержимое домашней папки пользователя. а я просил сделать это в папке проекта. ты понял?а где команда, которая вызвала эти сообщения?


  16. ubunta2

    [ БАН ]

    С нами с:
    27 июн 2017
    Сообщения:
    947
    Симпатии:
    28

    sudo команда эта

    SUDO — ДА НЕУЖЕЛИ! А ПОЛНОСТЬЮ КАКАЯ КОМАНДА БЫЛА?


  17. artoodetoo

    Команда форума
    Модератор

    С нами с:
    11 июн 2010
    Сообщения:
    10.820
    Симпатии:
    1.173
    Адрес:
    там-сям

    впрочем поxуй. я исчерпал запас свободного времени и доброты. пусть другие с тобой носятся.
    — Добавлено —
    мало того, что ты трудный, ты ещё и сознательно привираешь, как мне кажется.


  18. ubunta2

    [ БАН ]

    С нами с:
    27 июн 2017
    Сообщения:
    947
    Симпатии:
    28

    sudo npm i
    sudo npm
    — Добавлено —
    sudo npm install
    — Добавлено —

    1. > @ development /var/www/html
    2. > cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js —progress —hide-modules —config=node_modules/laravel-mix/setup/webpack.config.js
    3.       throw er; // Unhandled ‘error’ event
    4. Error: spawn node_modules/webpack/bin/webpack.js ENOENT
    5.     at _errnoException (util.js:1022:11)
    6.     at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    7.     at onErrorNT (internal/child_process.js:372:16)
    8.     at _combinedTickCallback (internal/process/next_tick.js:138:11)
    9.     at process._tickCallback (internal/process/next_tick.js:180:9)
    10.     at Function.Module.runMain (module.js:695:11)
    11.     at startup (bootstrap_node.js:188:16)
    12.     at bootstrap_node.js:609:3
    13. npm ERR! Linux 5.0.0-29-generic
    14. npm ERR! argv «/usr/bin/node» «/usr/bin/npm» «run» «development»
    15. npm ERR! @ development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js —progress —hide-modules —config=node_modules/laravel-mix/setup/webpack.config.js`
    16. 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’.
    17. npm ERR! Make sure you have the latest version of node.js and npm installed.
    18. npm ERR! If you do, this is most likely a problem with the  package,
    19. npm ERR! not with npm itself.
    20. npm ERR! Tell the author that this fails on your system:
    21. 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
    22. npm ERR! You can get information on how to open an issue for this project with:
    23. npm ERR! Or if that isn’t available, you can get their info via:
    24. npm ERR! There is likely additional logging output above.
    25. npm ERR! Please include the following file with any support request:
    26. npm ERR!     /var/www/html/npm-debug.log
    27. npm ERR! Linux 5.0.0-29-generic
    28. npm ERR! argv «/usr/bin/node» «/usr/bin/npm» «run» «dev»
    29. npm ERR! @ dev: `npm run development`
    30. npm ERR! Failed at the @ dev script ‘npm run development’.
    31. npm ERR! Make sure you have the latest version of node.js and npm installed.
    32. npm ERR! If you do, this is most likely a problem with the  package,
    33. npm ERR! not with npm itself.
    34. npm ERR! Tell the author that this fails on your system:
    35. npm ERR!     npm run development
    36. npm ERR! You can get information on how to open an issue for this project with:
    37. npm ERR! Or if that isn’t available, you can get their info via:
    38. npm ERR! There is likely additional logging output above.
    39. npm ERR! Please include the following file with any support request:
    40. npm ERR!     /var/www/html/npm-debug.log

    — Добавлено —
    sudo chown -R $USER:www-data /var/www/html
    — Добавлено —

    Вложения:

    • 0.zip
      Размер файла:
      25,3 КБ
      Просмотров:
      1


  19. ADSoft

    Забаньте это неадекватный поток бреда…

  20. :D


  21. vvas

    С нами с:
    9 апр 2018
    Сообщения:
    50
    Симпатии:
    10

    @ubunta2 Запускать локальный пакет

    1.     «development»: «./node_modules/.bin/cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js —progress —hide-modules —config=node_modules/laravel-mix/setup/webpack.config.js»,

    и остальные строки сделать по этому образцу.
    Если еще актуально.


  22. ubunta2

    [ БАН ]

    С нами с:
    27 июн 2017
    Сообщения:
    947
    Симпатии:
    28

    помощь в этом не нужна
    вопрос решен​

  • Печать

Страницы: [1]   Вниз

Тема: npm run dev проблема при этой команде  (Прочитано 3318 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
aleksand

npm run dev

> @ dev /var/www/html
> npm run development

> @ development /var/www/html
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

sh: 1: cross-env: not found

npm ERR! Linux 5.0.0-29-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "development"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @ development: `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! spawn ENOENT
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! /var/www/html/npm-debug.log

npm ERR! Linux 5.0.0-29-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "dev"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
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! /var/www/html/npm-debug.log


Пользователь добавил сообщение 29 Сентября 2019, 07:53:49:


npm install сделал?
да

---------- Добавлено 29.09.2019 в 04:45 ----------

npm install --global cross-env
npm WARN checkPermissions Missing write access to /usr/local/lib
/usr/local/lib
└─┬ cross-env@6.0.0
└─┬ cross-spawn@7.0.0
├── path-key@3.1.0
├─┬ shebang-command@1.2.0
│ └── shebang-regex@1.0.0
└─┬ which@1.3.1
└── isexe@2.0.0

npm ERR! Linux 5.0.0-29-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "--global" "cross-env"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /usr/local/lib
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access

npm ERR! Error: EACCES: permission denied, access '/usr/local/lib'
npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR! /var/www/html/npm-debug.log

---------- Добавлено 29.09.2019 в 04:47 ----------

npm install cross-env
/home/php
└─┬ cross-env@6.0.0
└─┬ cross-spawn@7.0.0
├── path-key@3.1.0
├─┬ shebang-command@1.2.0
│ └── shebang-regex@1.0.0
└─┬ which@1.3.1
└── isexe@2.0.0

npm WARN enoent ENOENT: no such file or directory, open '/home/php/package.json'
npm WARN php No description
npm WARN php No repository field.
npm WARN php No README data
npm WARN php No license field.

---------- Добавлено 29.09.2019 в 04:48 ----------

npm install cross-env
/home/php
└─┬ cross-env@6.0.0
└─┬ cross-spawn@7.0.0
├── path-key@3.1.0
├─┬ shebang-command@1.2.0
│ └── shebang-regex@1.0.0
└─┬ which@1.3.1
└── isexe@2.0.0

npm WARN enoent ENOENT: no such file or directory, open '/home/php/package.json'
npm WARN php No description
npm WARN php No repository field.
npm WARN php No README data
npm WARN php No license field.


Оффлайн
bezbo

npm ERR! Please try running this command again as root/Administrator.

Как бы намекает…


Оффлайн
aleksand

что нужно сделать?


Пользователь добавил сообщение 29 Сентября 2019, 09:42:08:


sudo npm install
npm WARN deprecated extract-text-webpack-plugin@3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.


Пользователь добавил сообщение 29 Сентября 2019, 09:49:24:


sudo npm install
npm WARN deprecated extract-text-webpack-plugin@3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated flatten@1.0.2: I wrote this module a very long time ago; you should use something else.
loadDep:ware → get        ▌ ╢██████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN prefer global node-gyp@3.8.0 should be installed with -g

> node-sass@4.12.0 install /var/www/html/node_modules/node-sass
> node scripts/install.js

Cached binary found at /home/php/.npm/node-sass/4.12.0/linux-x64-57_binding.node

> core-js@2.6.9 postinstall /var/www/html/node_modules/core-js
> node scripts/postinstall || echo "ignore"

> uglifyjs-webpack-plugin@0.4.6 postinstall /var/www/html/node_modules/webpack/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js

> node-sass@4.12.0 postinstall /var/www/html/node_modules/node-sass
> node scripts/build.js

Binary found at /var/www/html/node_modules/node-sass/vendor/linux-x64-57/binding.node
Testing binary
Binary is fine

> pngquant-bin@4.0.0 postinstall /var/www/html/node_modules/pngquant-bin
> node lib/install.js

  ⚠ The `/var/www/html/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work correctly
  ⚠ pngquant pre-build test failed
  ℹ compiling from source
  ✔ pngquant pre-build test passed successfully
  ✖ Error: pngquant failed to build, make sure that libpng-dev is installed
    at Promise.all.then.arr (/var/www/html/node_modules/pngquant-bin/node_modules/bin-build/node_modules/execa/index.js:231:11)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
/var/www/html
├── autoprefixer@7.2.6  extraneous
├─┬ axios@0.16.2
│ ├─┬ follow-redirects@1.9.0
│ │ └─┬ debug@3.2.6
│ │   └── ms@2.1.2
│ └── is-buffer@1.1.6
├── babel-loader@7.1.5  extraneous
├── babel-plugin-transform-object-rest-spread@6.26.0  extraneous
├── babel-plugin-transform-runtime@6.23.0  extraneous
├── babel-preset-env@1.7.0  extraneous
├── bootstrap-sass@3.4.1
├── chokidar@1.7.0  extraneous
├── concatenate@0.0.2  extraneous
├─┬ cross-env@5.2.1
│ └─┬ cross-spawn@6.0.5
│   ├── semver@5.7.1
│   └─┬ which@1.3.1
│     └── isexe@2.0.0
├── css-loader@0.28.11  extraneous
├── dotenv@4.0.0  extraneous
├── dotenv-expand@4.2.0  extraneous
├── extract-text-webpack-plugin@3.0.2  extraneous
├── file-loader@0.11.2  extraneous
├── friendly-errors-webpack-plugin@1.7.0  extraneous
├── fs-extra@3.0.1  extraneous
├── html-loader@0.4.5  extraneous
├── imagemin@5.3.1  extraneous
├── imagemin-gifsicle@5.2.0  extraneous
├── imagemin-mozjpeg@7.0.0  extraneous
├── imagemin-optipng@5.2.1  extraneous
├── imagemin-svgo@6.0.0  extraneous
├── jquery@3.4.1
├── lodash@4.17.15
├── md5@2.2.1  extraneous
├── node-sass@4.12.0  extraneous
├── postcss-loader@2.1.6  extraneous
├── resolve-url-loader@2.3.2  extraneous
├── sass-loader@6.0.7  extraneous
├── style-loader@0.18.2  extraneous
├── uglifyjs-webpack-plugin@1.3.0  extraneous
├── vue@2.6.10
├── vue-loader@13.7.3  extraneous
├── vue-template-compiler@2.6.10  extraneous
├── webpack@3.12.0  extraneous
├── webpack-chunk-hash@0.4.0  extraneous
├── webpack-dev-server@2.11.5  extraneous
├── webpack-merge@4.2.2  extraneous
└── webpack-notifier@1.8.0  extraneous

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9
npm WARN optional Skipping failed optional dependency /watchpack/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9
npm WARN optional Skipping failed optional dependency /webpack-dev-server/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9
npm WARN ajv-keywords@3.4.1 requires a peer of ajv@^6.9.1 but none was installed.
npm ERR! Linux 5.0.0-29-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! pngquant-bin@4.0.0 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pngquant-bin@4.0.0 postinstall script 'node lib/install.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 pngquant-bin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node lib/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs pngquant-bin
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls pngquant-bin
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /var/www/html/npm-debug.log


Пользователь добавил сообщение 29 Сентября 2019, 10:07:24:


npm install
npm WARN checkPermissions Missing write access to /var/www/html/node_modules
/var/www/html
├─┬ cross-env@5.2.1
│ └─┬ cross-spawn@6.0.5
│   ├── nice-try@1.0.5
│   ├── path-key@2.0.1
│   └─┬ shebang-command@1.2.0
│     └── shebang-regex@1.0.0
├─┬ imagemin@5.3.1
│ ├─┬ globby@6.1.0
│ │ └── pify@2.3.0
│ └── pify@2.3.0
├─┬ imagemin-gifsicle@5.2.0
│ ├─┬ exec-buffer@3.2.0
│ │ └─┬ execa@0.7.0
│ │   └── cross-spawn@5.1.0
│ └─┬ gifsicle@3.0.4
│   └─┬ bin-build@2.2.0
│     ├─┬ archive-type@3.2.0
│     │ └── file-type@3.9.0
│     ├─┬ decompress@3.0.0
│     │ ├─┬ buffer-to-vinyl@1.1.0
│     │ │ └── file-type@3.9.0
│     │ ├─┬ decompress-tarbz2@3.1.0
│     │ │ └─┬ seek-bzip@1.0.5
│     │ │   └─┬ commander@2.8.1
│     │ │     └── graceful-readlink@1.0.1
│     │ └─┬ decompress-unzip@3.4.0
│     │   └─┬ yauzl@2.10.0
│     │     ├── buffer-crc32@0.2.13
│     │     └─┬ fd-slicer@1.1.0
│     │       └── pend@1.2.0
│     └─┬ download@4.4.3
│       ├─┬ filenamify@1.2.1
│       │ ├── strip-outer@1.0.1
│       │ └── trim-repeated@1.0.0
│       └─┬ got@5.7.1
│         ├── is-retry-allowed@1.2.0
│         ├── lowercase-keys@1.0.1
│         └── url-parse-lax@1.0.0
├─┬ imagemin-mozjpeg@7.0.0
│ └─┬ execa@0.8.0
│   ├── cross-spawn@5.1.0
│   ├── get-stream@3.0.0
│   ├── npm-run-path@2.0.2
│   └── strip-eof@1.0.0
├─┬ laravel-mix@1.7.2
│ ├─┬ img-loader@2.0.1
│ │ └─┬ imagemin-pngquant@5.1.0
│ │   ├── execa@0.10.0
│ │   └─┬ pngquant-bin@4.0.0
│ │     ├─┬ bin-build@3.0.0
│ │     │ ├─┬ decompress@4.2.0
│ │     │ │ ├── decompress-tar@4.1.1
│ │     │ │ ├─┬ decompress-tarbz2@4.1.1
│ │     │ │ │ ├── file-type@6.2.0
│ │     │ │ │ └─┬ unbzip2-stream@1.3.3
│ │     │ │ │   └── buffer@5.4.3
│ │     │ │ ├── decompress-targz@4.1.1
│ │     │ │ ├─┬ decompress-unzip@4.0.1
│ │     │ │ │ ├── file-type@3.9.0
│ │     │ │ │ └── get-stream@2.3.1
│ │     │ │ ├── pify@2.3.0
│ │     │ │ └─┬ strip-dirs@2.1.0
│ │     │ │   └── is-natural-number@4.0.1
│ │     │ ├─┬ download@6.2.5
│ │     │ │ ├─┬ caw@2.0.1
│ │     │ │ │ ├─┬ get-proxy@2.1.0
│ │     │ │ │ │ └─┬ npm-conf@1.1.3
│ │     │ │ │ │   └─┬ config-chain@1.1.12
│ │     │ │ │ │     └── proto-list@1.2.4
│ │     │ │ │ ├─┬ isurl@1.0.0
│ │     │ │ │ │ ├─┬ has-to-string-tag-x@1.4.1
│ │     │ │ │ │ │ └── has-symbol-support-x@1.4.2
│ │     │ │ │ │ └── is-object@1.0.1
│ │     │ │ │ ├── tunnel-agent@0.6.0
│ │     │ │ │ └── url-to-options@1.0.1
│ │     │ │ ├─┬ ext-name@5.0.0
│ │     │ │ │ ├── ext-list@2.2.2
│ │     │ │ │ └── sort-keys-length@1.0.1
│ │     │ │ ├── file-type@5.2.0
│ │     │ │ ├─┬ filenamify@2.1.0
│ │     │ │ │ └── filename-reserved-regex@2.0.0
│ │     │ │ ├── get-stream@3.0.0
│ │     │ │ ├─┬ got@7.1.0
│ │     │ │ │ ├─┬ decompress-response@3.3.0
│ │     │ │ │ │ └── mimic-response@1.0.1
│ │     │ │ │ ├── duplexer3@0.1.4
│ │     │ │ │ ├── get-stream@3.0.0
│ │     │ │ │ ├── p-cancelable@0.3.0
│ │     │ │ │ └── timed-out@4.0.1
│ │     │ │ ├─┬ p-event@1.3.0
│ │     │ │ │ └── p-timeout@1.2.1
│ │     │ │ └── pify@3.0.0
│ │     │ ├─┬ execa@0.7.0
│ │     │ │ ├── cross-spawn@5.1.0
│ │     │ │ └── get-stream@3.0.0
│ │     │ └─┬ p-map-series@1.0.0
│ │     │   └── p-reduce@1.0.0
│ │     └─┬ execa@0.10.0
│ │       ├── cross-spawn@6.0.5
│ │       └── get-stream@3.0.0
│ └─┬ yargs@8.0.2
│   └─┬ read-pkg-up@2.0.0
│     └─┬ read-pkg@2.0.0
│       └─┬ load-json-file@2.0.0
│         └── pify@2.3.0
├─┬ node-sass@4.12.0
│ ├─┬ meow@3.7.0
│ │ └─┬ read-pkg-up@1.0.1
│ │   └─┬ read-pkg@1.1.0
│ │     ├─┬ load-json-file@1.1.0
│ │     │ └── pify@2.3.0
│ │     └─┬ path-type@1.1.0
│ │       └── pify@2.3.0
│ └─┬ request@2.88.0
│   └── tunnel-agent@0.6.0
└─┬ sass-loader@6.0.7
  └── pify@3.0.0

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9
npm WARN optional Skipping failed optional dependency /watchpack/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9
npm WARN optional Skipping failed optional dependency /webpack-dev-server/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9
npm WARN ajv-keywords@3.4.1 requires a peer of ajv@^6.9.1 but none was installed.
npm ERR! Linux 5.0.0-29-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! path /var/www/html/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access

npm ERR! Error: EACCES: permission denied, access '/var/www/html/node_modules'
npm ERR!  { Error: EACCES: permission denied, access '/var/www/html/node_modules'
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/var/www/html/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /var/www/html/npm-debug.log

« Последнее редактирование: 29 Сентября 2019, 10:07:24 от aleksand »


Оффлайн
bezbo

…gulp-util@3.0.8: gulp-util is deprecated — replace it
…node-gyp@3.8.0 should be installed with -g
…pngquant failed to build, make sure that libpng-dev is installed
…notsup Not compatible with your operating system or architecture: fsevents@1.2.9
…ajv-keywords@3.4.1 requires a peer of ajv@^6.9.1 but none was installed

как то так…


Оффлайн
aleksand

как сделать чтоб заработало


Оффлайн
bezbo

ответ очевиден:
— заменить gulp-util
— установить node-gyp@3.8.0 с ключом -g
— установить libpng-dev
— найти notsup, который подходит под вашу ОС и архитектуру
— установить ajv@^6.9.1


Оффлайн
aleksand

у меня нет специалистов


Пользователь добавил сообщение 29 Сентября 2019, 11:15:57:


я изучаю программированием сам


Пользователь добавил сообщение 29 Сентября 2019, 11:37:02:


npm install
npm WARN deprecated extract-text-webpack-plugin@3.0.2: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated flatten@1.0.2: I wrote this module a very long time ago; you should use something else.
loadDep:ware → get        ▄ ╢██████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN prefer global node-gyp@3.8.0 should be installed with -g

> node-sass@4.12.0 install /var/www/html/node_modules/node-sass
> node scripts/install.js

Cached binary found at /home/php/.npm/node-sass/4.12.0/linux-x64-57_binding.node

> core-js@2.6.9 postinstall /var/www/html/node_modules/core-js
> node scripts/postinstall || echo "ignore"

> uglifyjs-webpack-plugin@0.4.6 postinstall /var/www/html/node_modules/webpack/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js

> node-sass@4.12.0 postinstall /var/www/html/node_modules/node-sass
> node scripts/build.js

Binary found at /var/www/html/node_modules/node-sass/vendor/linux-x64-57/binding.node
Testing binary
Binary is fine

> pngquant-bin@4.0.0 postinstall /var/www/html/node_modules/pngquant-bin
> node lib/install.js

  ⚠ The `/var/www/html/node_modules/pngquant-bin/vendor/pngquant` binary doesn't seem to work correctly
  ⚠ pngquant pre-build test failed
  ℹ compiling from source
  ✔ pngquant pre-build test passed successfully
  ✖ Error: pngquant failed to build, make sure that libpng-dev is installed
    at Promise.all.then.arr (/var/www/html/node_modules/pngquant-bin/node_modules/bin-build/node_modules/execa/index.js:231:11)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
/var/www/html
├── autoprefixer@7.2.6  extraneous
├─┬ axios@0.16.2
│ ├─┬ follow-redirects@1.9.0
│ │ └─┬ debug@3.2.6
│ │   └── ms@2.1.2
│ └── is-buffer@1.1.6
├── babel-loader@7.1.5  extraneous
├── babel-plugin-transform-object-rest-spread@6.26.0  extraneous
├── babel-plugin-transform-runtime@6.23.0  extraneous
├── babel-preset-env@1.7.0  extraneous
├── bootstrap-sass@3.4.1
├── chokidar@1.7.0  extraneous
├── concatenate@0.0.2  extraneous
├─┬ cross-env@5.2.1
│ └─┬ cross-spawn@6.0.5
│   ├── semver@5.7.1
│   └─┬ which@1.3.1
│     └── isexe@2.0.0
├── css-loader@0.28.11  extraneous
├── dotenv@4.0.0  extraneous
├── dotenv-expand@4.2.0  extraneous
├── extract-text-webpack-plugin@3.0.2  extraneous
├── file-loader@0.11.2  extraneous
├── friendly-errors-webpack-plugin@1.7.0  extraneous
├── fs-extra@3.0.1  extraneous
├── html-loader@0.4.5  extraneous
├── imagemin@5.3.1  extraneous
├── imagemin-gifsicle@5.2.0  extraneous
├── imagemin-mozjpeg@7.0.0  extraneous
├── imagemin-optipng@5.2.1  extraneous
├── imagemin-svgo@6.0.0  extraneous
├── jquery@3.4.1
├── lodash@4.17.15
├── md5@2.2.1  extraneous
├── node-sass@4.12.0  extraneous
├── postcss-loader@2.1.6  extraneous
├── resolve-url-loader@2.3.2  extraneous
├── sass-loader@6.0.7  extraneous
├── style-loader@0.18.2  extraneous
├── uglifyjs-webpack-plugin@1.3.0  extraneous
├── vue@2.6.10
├── vue-loader@13.7.3  extraneous
├── vue-template-compiler@2.6.10  extraneous
├── webpack@3.12.0  extraneous
├── webpack-chunk-hash@0.4.0  extraneous
├── webpack-dev-server@2.11.5  extraneous
├── webpack-merge@4.2.2  extraneous
└── webpack-notifier@1.8.0  extraneous

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9
npm WARN optional Skipping failed optional dependency /watchpack/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9
npm WARN optional Skipping failed optional dependency /webpack-dev-server/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.9
npm WARN ajv-keywords@3.4.1 requires a peer of ajv@^6.9.1 but none was installed.
npm ERR! Linux 5.0.0-29-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! pngquant-bin@4.0.0 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pngquant-bin@4.0.0 postinstall script 'node lib/install.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 pngquant-bin package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node lib/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs pngquant-bin
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls pngquant-bin
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /var/www/html/npm-debug.log

« Последнее редактирование: 29 Сентября 2019, 11:37:02 от aleksand »


  • Печать

Страницы: [1]   Вверх

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Ошибка npm is not defined
  • Ошибка np 39225 1