question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

yarn create nx-workspace FAILS

See original GitHub issue

Expected 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.

  1. Create a new folder
  2. Open a CMD window and navigate to the folder you created.
  3. Type the command: yarn create nx-workspace myworkspacename
  4. Hit enter.
  5. When asked which stylesheet select SASS
  6. When asked if you want to create and app, select Angular.
  7. Install proceeds.
  8. 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:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
haakon-iocommented, Aug 5, 2019

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

0reactions
jaysoocommented, Jul 24, 2019

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npx create-nx-workspace fails · Issue #3584 · nrwl/nx - GitHub
Does it work with yarn create nx-workspace , something is wrong with global npm modules. If it doesn't, probably an issue with artifactory....
Read more >
Failed to create nx workspace - node.js - Stack Overflow
I am facing the same issue for resolving use below command for creating new workspace:- npx create-nx-workspace --preset=angular ...
Read more >
create-nx-workspace - CLI command
Install create-nx-workspace globally to invoke the command directly, or use npx create-nx-workspace , yarn create nx-workspace , or pnpx create-nx-workspace ...
Read more >
create-nx-workspace - npm
Smart, Fast and Extensible Build System. Latest version: 15.4.1, last published: 2 days ago. Start using create-nx-workspace in your project ...
Read more >
Nx/community - nrwl - Gitter
when generating api in the nx workspace apps [ nx g @nrwl/nest:app api ... it has no problem. project generated using [ npx...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found