Skip to content

@schematics(schematic schematics fail to run unit test with error no such file or directory) #12605

Closed
@AhsanAyaz

Description

@AhsanAyaz

PS: in short, this issue is similar to #860 from the old devkit repo. #860 was for blank schematic, this one is for the schematic schematics.

Bug Report or Feature Request (mark with an x)

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

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [x] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

node --version v8.11.1
npm --version 6.1.0
ng --version 1.6.8

Repro steps

schematics schematic --name ngx-schem
cd ngx-schem
npm run test

The log given by the failure

> tsc -p tsconfig.json

fs.js:646
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open '/path/to/project/node_modules/fsevents/node_modules/needle/test/keys/ssl.cert'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at Object.<anonymous> (/path/to/project/node_modules/fsevents/node_modules/needle/test/helpers.js:9:13)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)

Desired functionality

Should run tests successfully.

Mention any other details that might be useful

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions