angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.68k stars 11.98k forks source link

Can't run ng cli in a user group that contains my user #8252

Closed WagnerMoreira closed 4 years ago

WagnerMoreira commented 6 years ago

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.4.9 node: 8.7.0 os: linux x64 UBUNTU @angular/animations: 4.4.6 @angular/common: 4.4.6 @angular/compiler: 4.4.6 @angular/core: 4.4.6 @angular/flex-layout: 2.0.0-beta.9 @angular/forms: 4.4.6 @angular/http: 4.4.6 @angular/platform-browser: 4.4.6 @angular/platform-browser-dynamic: 4.4.6 @angular/router: 4.4.6 @angular/service-worker: 1.0.0-beta.16 @angular/cli: 1.4.9 @angular/compiler-cli: 4.4.6 @angular/language-service: 4.4.6 typescript: 2.5.3

Repro steps.

The log given by the failure.

0 info it worked if it ends with ok
1 verbose cli [ '/home/wagner/.nvm/versions/node/v8.7.0/bin/node',
1 verbose cli   '/home/wagner/.nvm/versions/node/v8.7.0/bin/npm',
1 verbose cli   'run',
1 verbose cli   'build-local-dev' ]
2 info using npm@5.4.2
3 info using node@v8.7.0
4 verbose run-script [ 'prebuild-local-dev',
4 verbose run-script   'build-local-dev',
4 verbose run-script   'postbuild-local-dev' ]
5 info lifecycle nick-sports-app@0.0.0~prebuild-local-dev: nick-sports-app@0.0.0
6 info lifecycle nick-sports-app@0.0.0~build-local-dev: nick-sports-app@0.0.0
7 verbose lifecycle nick-sports-app@0.0.0~build-local-dev: unsafe-perm in lifecycle true
8 verbose lifecycle nick-sports-app@0.0.0~build-local-dev: PATH: /home/wagner/.nvm/versions/node/v8.7.0/lib/node_modules/npm/bin/node-gyp-bin:/home/wagner/redspace/nickelodeon/nick-sports-lets-play/html/wp-content/themes/nicksports/frontend/node_modules/.bin:/home/wagner/.nvm/versions/node/v8.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle nick-sports-app@0.0.0~build-local-dev: CWD: /home/wagner/redspace/nickelodeon/nick-sports-lets-play/html/wp-content/themes/nicksports/frontend
10 silly lifecycle nick-sports-app@0.0.0~build-local-dev: Args: [ '-c',
10 silly lifecycle   'ng build --watch --output-hashing=none --extract-css=true --sourcemaps --app=dev' ]
11 silly lifecycle nick-sports-app@0.0.0~build-local-dev: Returned: code: 1  signal: null
12 info lifecycle nick-sports-app@0.0.0~build-local-dev: Failed to exec build-local-dev script
13 verbose stack Error: nick-sports-app@0.0.0 build-local-dev: `ng build --watch --output-hashing=none --extract-css=true --sourcemaps --app=dev`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/home/wagner/.nvm/versions/node/v8.7.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at EventEmitter.emit (events.js:213:7)
13 verbose stack     at ChildProcess.<anonymous> (/home/wagner/.nvm/versions/node/v8.7.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at ChildProcess.emit (events.js:213:7)
13 verbose stack     at maybeClose (internal/child_process.js:927:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid nick-sports-app@0.0.0
15 verbose cwd /home/wagner/redspace/nickelodeon/nick-sports-lets-play/html/wp-content/themes/nicksports/frontend
16 verbose Linux 4.13.0-16-generic
17 verbose argv "/home/wagner/.nvm/versions/node/v8.7.0/bin/node" "/home/wagner/.nvm/versions/node/v8.7.0/bin/npm" "run" "build-local-dev"
18 verbose node v8.7.0
19 verbose npm  v5.4.2
20 error code ELIFECYCLE
21 error errno 1
22 error nick-sports-app@0.0.0 build-local-dev: `ng build --watch --output-hashing=none --extract-css=true --sourcemaps --app=dev`
22 error Exit status 1
23 error Failed at the nick-sports-app@0.0.0 build-local-dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

ls -l result:

total 400
srwxr-xr-x   1 www-data www-data      0 out 22 19:29 1.15.1-m
srwxr-xr-x   1 www-data www-data      0 out 22 19:29 1.15.1-s
drwxr-xr-x   2 www-data www-data   4096 out 22 19:29 e2e
-rwxr-xr-x   1 www-data www-data   1016 out 22 19:29 karma.conf.js
-rwxr-xr-x   1 www-data www-data    624 out 27 14:13 ngsw-manifest.json
drwxr-xr-x 816 www-data www-data  32768 out 26 09:28 node_modules
-rwxr-xr-x   1 www-data www-data   2823 out 27 14:13 package.json
-rwxr-xr-x   1 www-data www-data 333149 out 27 14:13 package-lock.json
-rwxr-xr-x   1 www-data www-data    722 out 22 19:29 protractor.conf.js
-rwxr-xr-x   1 www-data www-data    102 out 22 19:29 proxy.conf.json
-rwxr-xr-x   1 www-data www-data   1739 out 22 19:29 README.md
drwxr-xr-x   5 www-data www-data   4096 out 27 14:13 src
-rwxr-xr-x   1 www-data www-data    363 out 22 19:29 tsconfig.json
-rwxr-xr-x   1 www-data www-data    302 out 22 19:29 tslint.json

groups wagner result: wagner : www-data adm cdrom sudo dip plugdev lpadmin sambashare docker Since my user is in www-data why npm run x doesn't work?

Desired functionality.

npm run should be working since the user group owner of the files contains my user

Mention any other details that might be useful.

kentonbmax commented 5 years ago

Hi I believe after hours of searching I am also facing this issue. Is there a work around?

filipesilva commented 4 years ago

I'm not sure what's happening here but it looks like a npm bug? A better place to ask about this should be in their issue tracker. If this is still happening and it happens on ng command calls (without npm run) then let us know with a reproduction so we can investigate.

angular-automatic-lock-bot[bot] commented 4 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.