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

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

Closed
AhsanAyaz opened this issue Oct 16, 2018 · 3 comments

Comments

@AhsanAyaz
Copy link
Contributor

AhsanAyaz commented Oct 16, 2018

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

@alan-agius4
Copy link
Collaborator

Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.

If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.

@AhsanAyaz
Copy link
Contributor Author

AhsanAyaz commented Oct 16, 2018

@alan-agius4 I'm using the latest version of CLI & devkit schematics. I.e. 7.0.0-rc.3
The issue still persists. :)

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/

Angular CLI: 1.6.8
Node: 8.11.1
OS: darwin x64
Angular: undefined
...


@angular-devkit/core: 7.0.0-rc.3
@angular-devkit/schematics: 7.0.0-rc.3
typescript: 2.9.2
webpack: error

Please correct me if the above details are contradicting with my statements.

kyliau pushed a commit that referenced this issue Oct 23, 2018
Fixed the  schematics to not consider node_module specs while running unit tests
Fixes #12605
kyliau pushed a commit that referenced this issue Oct 23, 2018
Fixed the  schematics to not consider node_module specs while running unit tests
Fixes #12605
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants