In laravel 5.8 app I suffer error:
sh: 1: cross-env: Permission denied
on command
npm run watch-poll
That happed after I installed ubuntu 18.04 and composer/nodejs/nmp as:
$ uname -a
Linux serge 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ composer --version
Composer 1.6.3 2018-01-31 16:28:17
$ nodejs --version
v10.16.1
$ npm --version
6.9.0
I mannully removed directory node_modules and run :
$ npm install
> node-sass@4.12.0 install /mnt/_work_sdb8/wwwroot/lar/votes/node_modules/node-sass
> node scripts/install.js
Cached binary found at /home/serge/.npm/node-sass/4.12.0/linux-x64-64_binding.node
> puppeteer@1.19.0 install /mnt/_work_sdb8/wwwroot/lar/votes/node_modules/puppeteer
> node install.js
Downloading Chromium r674921 - 112.6 Mb [====================] 100% 0.0s
Chromium downloaded to /mnt/_work_sdb8/wwwroot/lar/votes/node_modules/puppeteer/.local-chromium/linux-674921
> core-js-pure@3.1.4 postinstall /mnt/_work_sdb8/wwwroot/lar/votes/node_modules/core-js-pure
> node scripts/postinstall || echo "ignore"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> node-sass@4.12.0 postinstall /mnt/_work_sdb8/wwwroot/lar/votes/node_modules/node-sass
> node scripts/build.js
Binary found at /mnt/_work_sdb8/wwwroot/lar/votes/node_modules/node-sass/vendor/linux-x64-64/binding.node
Testing binary
Binary is fine
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 1192 packages from 569 contributors and audited 15586 packages in 32.601s
found 0 vulnerabilities
serge@serge:/mnt/_work_sdb8/wwwroot/lar/votes$ npm run watch-poll
> @ watch-poll /mnt/_work_sdb8/wwwroot/lar/votes
> npm run watch -- --watch-poll
> @ watch /mnt/_work_sdb8/wwwroot/lar/votes
> npm run development -- --watch "--watch-poll"
> @ development /mnt/_work_sdb8/wwwroot/lar/votes
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" "--watch-poll"
sh: 1: cross-env: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
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 "--watch" "--watch-poll"`
npm ERR! Exit status 126
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/2019-08-06T14_56_10_670Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! @ watch: `npm run development -- --watch "--watch-poll"`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the @ watch 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/2019-08-06T14_56_10_688Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! @ watch-poll: `npm run watch -- --watch-poll`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the @ watch-poll 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/2019-08-06T14_56_10_709Z-debug.log
Mentioned files :
2019-08-06T14_56_10_670Z-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli '/usr/bin/npm',
1 verbose cli 'run',
1 verbose cli 'development',
1 verbose cli '--',
1 verbose cli '--watch',
1 verbose cli '--watch-poll' ]
2 info using npm@6.9.0
3 info using node@v10.16.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/votes/node_modules/.bin:/usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/.bin:/usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle @~development: CWD: /mnt/_work_sdb8/wwwroot/lar/votes
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 "--watch" "--watch-poll"' ]
11 silly lifecycle @~development: Returned: code: 126 signal: null
12 info lifecycle @~development: Failed to exec development script
13 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 "--watch" "--watch-poll"`
13 verbose stack Exit status 126
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid @
15 verbose cwd /mnt/_work_sdb8/wwwroot/lar/votes
16 verbose Linux 4.15.0-20-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "development" "--" "--watch" "--watch-poll"
18 verbose node v10.16.1
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 126
22 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 "--watch" "--watch-poll"`
22 error Exit status 126
23 error Failed at the @ development script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 126, true ]
2019-08-06T14_56_10_688Z-debug.log :
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli '/usr/bin/npm',
1 verbose cli 'run',
1 verbose cli 'watch',
1 verbose cli '--',
1 verbose cli '--watch-poll' ]
2 info using npm@6.9.0
3 info using node@v10.16.1
4 verbose run-script [ 'prewatch', 'watch', 'postwatch' ]
5 info lifecycle @~prewatch: @
6 info lifecycle @~watch: @
7 verbose lifecycle @~watch: unsafe-perm in lifecycle true
8 verbose lifecycle @~watch: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/.bin:/usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle @~watch: CWD: /mnt/_work_sdb8/wwwroot/lar/votes
10 silly lifecycle @~watch: Args: [ '-c', 'npm run development -- --watch "--watch-poll"' ]
11 silly lifecycle @~watch: Returned: code: 126 signal: null
12 info lifecycle @~watch: Failed to exec watch script
13 verbose stack Error: @ watch: `npm run development -- --watch "--watch-poll"`
13 verbose stack Exit status 126
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid @
15 verbose cwd /mnt/_work_sdb8/wwwroot/lar/votes
16 verbose Linux 4.15.0-20-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "watch" "--" "--watch-poll"
18 verbose node v10.16.1
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 126
22 error @ watch: `npm run development -- --watch "--watch-poll"`
22 error Exit status 126
23 error Failed at the @ watch script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 126, true ]
2019-08-06T14_56_10_709Z-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'watch-poll' ]
2 info using npm@6.9.0
3 info using node@v10.16.1
4 verbose run-script [ 'prewatch-poll', 'watch-poll', 'postwatch-poll' ]
5 info lifecycle @~prewatch-poll: @
6 info lifecycle @~watch-poll: @
7 verbose lifecycle @~watch-poll: unsafe-perm in lifecycle true
8 verbose lifecycle @~watch-poll: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/mnt/_work_sdb8/wwwroot/lar/votes/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle @~watch-poll: CWD: /mnt/_work_sdb8/wwwroot/lar/votes
10 silly lifecycle @~watch-poll: Args: [ '-c', 'npm run watch -- --watch-poll' ]
11 silly lifecycle @~watch-poll: Returned: code: 126 signal: null
12 info lifecycle @~watch-poll: Failed to exec watch-poll script
13 verbose stack Error: @ watch-poll: `npm run watch -- --watch-poll`
13 verbose stack Exit status 126
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid @
15 verbose cwd /mnt/_work_sdb8/wwwroot/lar/votes
16 verbose Linux 4.15.0-20-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "watch-poll"
18 verbose node v10.16.1
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 126
22 error @ watch-poll: `npm run watch -- --watch-poll`
22 error Exit status 126
23 error Failed at the @ watch-poll script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 126, true ]
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.19.0",
"bootstrap": "^4.3.1",
"cross-env": "^5.1",
"laravel-mix": "^4.0.16",
"lodash": "^4.17.11",
"popper.js": "^1.14.6",
"vue": "^2.5.7"
},
"dependencies": {
"bootstrap-colorpicker": "^3.1.2",
"datatables.net-bs": "^1.10.19",
"font-awesome": "^4.7.0",
"jquery": "^3.4.1",
"jquery-confirm": "^3.3.2",
"laravel-echo": "^1.5.2",
"mustache": "^2.3.0",
"node-sass": "^4.12.0",
"puppeteer": "^1.19.0",
"resolve-url-loader": "^2.3.1",
"sass-loader": "^7.1.0",
"vue-template-compiler": "^2.6.10"
}
}
Googling for decision I found sh: 1: cross-env: Permission denied on laravel mix with decision :
Ok I figure out the problem, the storage where the project is saved is auto-mounted and it have no execution permission.
easily in /etc/fstab file i added exec in the mount option, like this:
auto,user,exec,utf8,uid=1000,gid=1000,rw 0 0
so I modified this partition in /etc/fstab :
UUID=72209A012099CD0B /mnt/Media_sda8 ntfs-3g exec,uid=1000,gid=1000,dmask=022,fmask=133 rw 0 0
and restarting the OS. I have the same problem. Has line above correct syntax?
On prior kubuntu 18.4 installation it worked ok.
How to fix it?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire