Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission errors after Starting 'test:client' #2374

Closed
1 task done
nstuyvesant opened this issue Dec 1, 2016 · 3 comments
Closed
1 task done

Permission errors after Starting 'test:client' #2374

nstuyvesant opened this issue Dec 1, 2016 · 3 comments

Comments

@nstuyvesant
Copy link
Contributor

nstuyvesant commented Dec 1, 2016

  • I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests.
Item Version
generator-angular-fullstack 4.1.0
Node 6.9.1
npm 4.0.3
Operating System OS X 10.12.1
Item Answer
Transpiler Babel
Markup Pug
CSS SCSS
Router ui-router
Client Tests Mocha
DB None
Auth N

Generated a generic test project (no Auth or DB - and unedited) using yo angular-fullstack then ran npm test. Got some permission errors just after Starting 'test:client' that are odd...

[00:20:55] Starting 'test:client'...
{ Error: EACCES: permission denied, mkdir '/client'
at Error (native)

cause:
{ Error: EACCES: permission denied, mkdir '/client'
at Error (native)
errno: -13, code: 'EACCES', syscall: 'mkdir', path: '/client' },
isOperational: true,
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/client' }

This is happening just before Karma starts so I think the generated webpack.make.js is trying to create /client (off of root) instead of using the base directory where the project is.

Is this happening for anyone else?

@JoelParke
Copy link

JoelParke commented Dec 10, 2016

I see this also on a fresh generation, build, test.... (plus 11 warnings from eslint that I fixed first)

  • Ubuntu 16.10
  • generatorVersion: 4.1.1
  • typeScript, mongoose, html, sass, ngroute, bootstrap, socketio, uibootstrap, mocha, jasmine, expect

Running 'gulp test' shows:
...
...
[16:11:26] Starting 'test:client'...
{ [Error: EACCES: permission denied, mkdir '/client']
cause: { [Error: EACCES: permission denied, mkdir '/client'] errno: -13, code: 'EACCES', syscall: 'mkdir', path: '/client' },
isOperational: true,
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/client' }
10 12 2016 16:11:28.866:INFO [karma]: Karma v0.13.22 server started at http://localhost:9000/
10 12 2016 16:11:28.869:INFO [launcher]: Starting browser PhantomJS
[default] Checking started in a separate process...
10 12 2016 16:11:29.052:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket MtoAMW5RjHWhqTt6AAAA with id 2470969

Component: MainComponent
✓ should attach a list of things to the controller

Controller: OauthButtonsController
✓ should attach loginOauth

Directive: oauthButtons
✓ should contain anchor buttons
✓ should evaluate and bind the classes attribute to scope.classes
✓ should bind scope.classes to class names on the anchor buttons

PhantomJS 2.1.1 (Linux 0.0.0): Executed 5 of 5 SUCCESS (0.043 secs / 0.018 secs)
TOTAL: 5 SUCCESS

[16:11:29] Finished 'test:client' after 2.68 s
[16:11:29] Finished 'test' after 3.72 s
$ [default] /home/joel/workspace/Tracker2-ts/client/app/main/main.component.spec.ts:8:22
Property 'mock' does not exist on type 'IAngularStatic'.
[default] /home/joel/workspace/Tracker2-ts/client/app/main/main.component.spec.ts:9:22
Property 'mock' does not exist on type 'IAngularStatic'.
[default] /home/joel/workspace/Tracker2-ts/client/app/main/main.component.spec.ts:16:14
Cannot find name 'inject'.
[default] /home/joel/workspace/Tracker2-ts/client/app/main/main.component.spec.ts:37:5
Cannot find name 'expect'.
[default] /home/joel/workspace/Tracker2-ts/client/components/oauth-buttons/oauth-buttons.controller.spec.ts:14:22
Property 'mock' does not exist on type 'IAngularStatic'.
[default] /home/joel/workspace/Tracker2-ts/client/components/oauth-buttons/oauth-buttons.controller.spec.ts:17:14
Cannot find name 'inject'.
[default] /home/joel/workspace/Tracker2-ts/client/components/oauth-buttons/oauth-buttons.controller.spec.ts:28:5
Cannot find name 'expect'.
[default] /home/joel/workspace/Tracker2-ts/client/components/oauth-buttons/oauth-buttons.directive.spec.ts:8:22
Property 'mock' does not exist on type 'IAngularStatic'.
[default] /home/joel/workspace/Tracker2-ts/client/components/oauth-buttons/oauth-buttons.directive.spec.ts:14:5
Cannot find name 'inject'.
[default] /home/joel/workspace/Tracker2-ts/client/components/oauth-buttons/oauth-buttons.directive.spec.ts:22:14
Cannot find name 'inject'.
[default] /home/joel/workspace/Tracker2-ts/client/components/oauth-buttons/oauth-buttons.directive.spec.ts:28:5
Cannot find name 'expect'.
[default] /home/joel/workspace/Tracker2-ts/client/components/oauth-buttons/oauth-buttons.directive.spec.ts:34:5
Cannot find name 'expect'.
[default] /home/joel/workspace/Tracker2-ts/client/components/oauth-buttons/oauth-buttons.directive.spec.ts:42:5
Cannot find name 'expect'.
[default] /home/joel/workspace/Tracker2-ts/client/components/oauth-buttons/oauth-buttons.directive.spec.ts:47:5
Cannot find name 'expect'.
[default] /home/joel/workspace/Tracker2-ts/client/components/socket/socket.mock.ts:2:7
Cannot redeclare block-scoped variable 'angular'.
[default] /home/joel/workspace/Tracker2-ts/typings/browser/ambient/angular-resource/index.d.ts:17:19
Cannot redeclare block-scoped variable 'angular'.
[default] /home/joel/workspace/Tracker2-ts/typings/browser/ambient/angular-resource/index.d.ts:184:19
Cannot redeclare block-scoped variable 'angular'.
[default] /home/joel/workspace/Tracker2-ts/typings/browser/ambient/angular/index.d.ts:10:13
Cannot redeclare block-scoped variable 'angular'.
[default] /home/joel/workspace/Tracker2-ts/typings/browser/ambient/angular/index.d.ts:27:19
Cannot redeclare block-scoped variable 'angular'.

and then hangs... in the terminal. So it seems that things are a bit out of date??? perhaps.
And it seems that these messages are coming from a test process that is running in background and doesn't get destroyed.

BUT I will continue to work on moving a large project built from yo last year to the most recent structure.

@gordonaspin
Copy link

Same issue here with:
node 6.9.4
npm 3.10.10
[email protected]

[10:01:35] Starting 'test:client'...
/[snip]/karma.conf.js
24 01 2017 10:01:35.950:DEBUG [plugin]: Loading inlined plugin (defining launcher:Chrome, launcher:ChromeCanary, launcher:Chromium, launcher:Dartium, test).
24 01 2017 10:01:35.951:DEBUG [plugin]: Loading inlined plugin (defining preprocessor:coverage, reporter:coverage).
24 01 2017 10:01:35.951:DEBUG [plugin]: Loading inlined plugin (defining launcher:Firefox, launcher:FirefoxDeveloper, launcher:Firefox Aurora, launcher:FirefoxNightly).
24 01 2017 10:01:35.951:DEBUG [plugin]: Loading inlined plugin (defining framework:mocha).
24 01 2017 10:01:35.952:DEBUG [plugin]: Loading inlined plugin (defining framework:chai, framework:chai-as-promised, framework:sinon-chai, framework:chai-dom, framework:chai-jquery, framework:chai-things).
24 01 2017 10:01:35.952:DEBUG [plugin]: Loading inlined plugin (defining reporter:spec).
24 01 2017 10:01:35.952:DEBUG [plugin]: Loading inlined plugin (defining launcher:PhantomJS).
24 01 2017 10:01:35.952:DEBUG [plugin]: Loading inlined plugin (defining launcher:Script).
24 01 2017 10:01:35.952:DEBUG [plugin]: Loading inlined plugin (defining webpackPlugin, preprocessor:webpack, middleware:webpackBlocke
r).
24 01 2017 10:01:35.952:DEBUG [plugin]: Loading inlined plugin (defining preprocessor:sourcemap).
{ Error: EACCES: permission denied, mkdir '/client'
at Error (native)

cause:
{ Error: EACCES: permission denied, mkdir '/client'
at Error (native)
errno: -13, code: 'EACCES', syscall: 'mkdir', path: '/client' },
isOperational: true,
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/client' }
24 01 2017 10:01:39.991:INFO [karma]: Karma v0.13.22 server started at http://localhost:9000/

@Awk34
Copy link
Member

Awk34 commented Jan 24, 2017

Apologies for this guys, I thought I had pushed this fix. This is the fix:

webpack.make.js

    // Skip rendering index.html in test mode
    // Reference: https://github.com/ampedandwired/html-webpack-plugin
    // Render index.html
    if(!TEST) {
        let htmlConfig = {
            template: 'client/_index.html',
            filename: '../client/index.html',
            alwaysWriteToDisk: true
        }
        config.plugins.push(
          new HtmlWebpackPlugin(htmlConfig),
          new HtmlWebpackHarddiskPlugin()
        );
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants