yarn create nx-workspace FAILS
See original GitHub issueExpected Behavior
When I run:
yarn create nx-workspace
expect that it will create a work space successfully.
Current Behavior
When I try to run this create command in either yarn or npm they both fail on the cypress install part.
Failure Information (for bugs)
cypress@3.3.2 postinstall C:\webs\yarn\ngic\node_modules\cypress node index.js --exec install
The environment variable CYPRESS_BINARY_VERSION has been renamed to CYPRESS_INSTALL_BINARY as of version 3.0.0
You should set CYPRESS_INSTALL_BINARY instead.
Platform: win32 (10.0.14393) Cypress Version: 3.3.2 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”:“win32”,“arch”:“x64”})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cypress@3.3.2 postinstall: node index.js --exec install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cypress@3.3.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
- Create a new folder
- Open a CMD window and navigate to the folder you created.
- Type the command: yarn create nx-workspace myworkspacename
- Hit enter.
- When asked which stylesheet select SASS
- When asked if you want to create and app, select Angular.
- Install proceeds.
- Failure occurs with this message:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cypress@3.3.2 postinstall:
node index.js --exec install
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the cypress@3.3.2 postinstall 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! C:\Users\i817793\AppData\Roaming\npm-cache_logs\2019-07-09T19_13_41_641Z-debug.log Package install failed, see above. Workspace creation failed, see above. child_process.js:669 throw err; ^
Error: Command failed: “C:\Users\i817793\AppData\Local\Temp\tmp-9496EDTnEyU5s2js\node_modules.bin\ng” new “NGIC” --collection=@nrwl/workspace at checkExecSyncError (child_process.js:629:11) at Object.execSync (child_process.js:666:13) at Object.<anonymous> (C:\Users\i817793\AppData\Local\Yarn\Data\global\node_modules\create-nx-workspace\bin\create-nx-workspace.js:73:17) at Module._compile (internal/modules/cjs/loader.js:776:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Function.Module.runMain (internal/modules/cjs/loader.js:829:12) at startup (internal/bootstrap/node.js:283:19) error Command failed. Exit code: 1 Command: C:\Users\i817793\AppData\Local\Yarn\bin\create-nx-workspace Arguments: myworkspacename Directory: C:\webs\yarn Output:
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.
Context
Please provide any relevant information about your setup:
- version of Nx used - 8.0.6 - version of Angular CLI used
angular.json
configuration 8.0.6- version of Angular DevKit used- 3rd-party libraries and their versions
- and most importantly - a use-case that fails
A minimal reproduce scenario using allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem.
Failure Logs
6079 verbose stack Error: cypress@3.3.2 postinstall: node index.js --exec install
6079 verbose stack Exit status 1
6079 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
6079 verbose stack at EventEmitter.emit (events.js:198:13)
6079 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
6079 verbose stack at ChildProcess.emit (events.js:198:13)
6079 verbose stack at maybeClose (internal/child_process.js:982:16)
6079 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
6080 verbose pkgid cypress@3.3.2
6081 verbose cwd C:\webs\yarn\ngic
6082 verbose Windows_NT 10.0.14393
6083 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “install”
6084 verbose node v10.16.0
6085 verbose npm v6.9.0
6086 error code ELIFECYCLE
6087 error errno 1
6088 error cypress@3.3.2 postinstall: node index.js --exec install
6088 error Exit status 1
6089 error Failed at the cypress@3.3.2 postinstall script.
6089 error This is probably not a problem with npm. There is likely additional logging output above.
6090 verbose exit [ 1, true ]
Other
Any other relevant information that will help us help you.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
I abandoned the idea of using this package because of this issue. Sad that I just get a shrug and not our issue response. Oh well, c’est la vie
@haakon-io Sounds like this is an external issue with the firewall.
I found a related Cypress issue that provides some instructions to circumvent the need for downloading the binary via postinstall script. https://github.com/cypress-io/cypress/issues/1401#issuecomment-496102788 (Maybe this helps)
Closing this issue since it doesn’t look like a bug with Nx.