webiny-js icon indicating copy to clipboard operation
webiny-js copied to clipboard

Internal Error: Assertion failed: Expected workspace api-file-manager-download

Open thoughtAddict opened this issue 3 years ago • 4 comments

Version

New Install - No Webiny Version

Operating System

Amazon Linux 2, t3.micro

Browser

Chrome 99

What steps will reproduce the bug?

Step 1: nvm install v12.13.0

Output: Downloading and installing node v12.13.0... Downloading https://nodejs.org/dist/v12.13.0/node-v12.13.0-linux-x64.tar.xz... ############################################################################################# 100.0% Computing checksum with sha256sum Checksums matched! Now using node v12.13.0 (npm v6.12.0) Creating default alias: default -> v12.13.0

Step 2: npm install yarn -g

Output:

[email protected] preinstall /home/ec2-user/.nvm/versions/node/v12.13.0/lib/node_modules/yarn :; (node ./preinstall.js > /dev/null 2>&1 || true)

/home/ec2-user/.nvm/versions/node/v12.13.0/bin/yarnpkg -> /home/ec2-user/.nvm/versions/node/v12.13.0/lib/node_modules/yarn/bin/yarn.js /home/ec2-user/.nvm/versions/node/v12.13.0/bin/yarn -> /home/ec2-user/.nvm/versions/node/v12.13.0/lib/node_modules/yarn/bin/yarn.js

Step 3: npx create-webiny-project webiny-test

Output: npx: installed 168 in 11.658s Initializing a new Webiny project in /home/ec2-user/webiny/webiny-test... ✔ Prepare project folder ✔ Setup yarn ✔ Install template package Starting @webiny/cwp-template-aws template ...

ERROR OUTPUT:

Cannot find module '@webiny/cwp-template-aws/package.json' Require stack:

  • /home/ec2-user/.npm/_npx/3192/lib/node_modules/create-webiny-project/utils/createProject.js
  • /home/ec2-user/.npm/_npx/3192/lib/node_modules/create-webiny-project/index.js
  • /home/ec2-user/.npm/_npx/3192/lib/node_modules/create-webiny-project/bin.js

SYSTEM INFORMATION:

Operating System: linux Node: 12.13.0 Yarn: 3.2.1 create-webiny-project: 5.26.0 Template: N/A Template Options: {}

Please open an issue including the error output at https://github.com/webiny/webiny-js/issues/new. You can also get in touch with us on our Slack Community: https://www.webiny.com/slack

Writing log to /home/ec2-user/webiny/cwp-logs.txt... Cleaning up generated files and folders... Done.

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

This is actually my 4th attempt to install Webiny on an Amazon Linux EC2 (t3.micro) instance.

Each time I've started fresh, new Node, Yarn, and AWS credentials setup.

The first few attempts I tried Yarn v2 with Node v14.18.0.

When using Yarn 2, I noticed that the "npx create-webiny-project" step would update my Yarn version to v3.

I'd then get an error stating that workspace "api-file-manager-download" not found. (Looked to be a Yarn issue.)

For this attempt I've tried to keep to version Node v12.13.0 and Yarn 1.22.x.

New error.

If anyone can help out, I'd appreciate it. I've been wanting to dive into Webiny but am having nothing but issues trying to install.

Possible solution

No response

thoughtAddict avatar May 19 '22 00:05 thoughtAddict

Other information that might help:

EC2 is behind an AWS ALB with ports 80 / 443 open.

thoughtAddict avatar May 19 '22 00:05 thoughtAddict

What's curious is I ran the same command, same machine just now.

Different result, but still related to "cwp-template-aws":

npx create-webiny-project webiny-test npx: installed 168 in 8.024s Initializing a new Webiny project in /home/ec2-user/webiny/webiny-test... ✔ Prepare project folder ✔ Setup yarn ✖ Install template package → ➤ YN0000: Failed with errors in 1m 25s

ERROR OUTPUT:

Command failed with exit code 1: yarn add @webiny/cwp-template-aws@latest ➤ YN0000: ┌ Resolution step ➤ YN0061: │ flatten@npm:1.0.3 is deprecated: flatten is deprecated in favor of utility frameworks such as lodash. ➤ YN0061: │ read-package-tree@npm:5.3.1 is deprecated: The functionality that this package provided is now in @npmcli/arborist ➤ YN0061: │ uuid@npm:3.3.2 is deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. ➤ YN0061: │ querystring@npm:0.2.0 is deprecated: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. ➤ YN0002: │ @webiny/cli@npm:5.26.0 doesn't provide graphql (pef85d), requested by graphql-request ➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements for details, where is the six-letter p-prefixed code ➤ YN0000: └ Completed in 6s 793ms ➤ YN0000: ┌ Fetch step ➤ YN0013: │ @babel/code-frame@npm:7.16.7 can't be found in the cache and will be fetched from the remote registry ➤ YN0013: │ @babel/helper-validator-identifier@npm:7.16.7 can't be found in the cache and will be fetched from the remote registry ➤ YN0013: │ @babel/highlight@npm:7.17.12 can't be found in the cache and will be fetched from the remote registry ➤ YN0013: │ @colors/colors@npm:1.5.0 can't be found in the cache and will be fetched from the remote registry ➤ YN0013: │ @grpc/grpc-js@npm:1.3.8 can't be found in the cache and will be fetched from the remote registry ➤ YN0013: │ @babel/helper-validator-identifier@npm:7.16.7 can't be found in the cache and will be fetched from the remote registry ... ... looonnnnnggg list ... ➤ YN0000: └ Completed in 1m 9s ➤ YN0000: ┌ Link step ➤ YN0007: │ @pulumi/aws@npm:4.38.1 must be built because it never has been before or the last one failed ➤ YN0007: │ protobufjs@npm:6.11.2 must be built because it never has been before or the last one failed ➤ YN0009: │ @pulumi/aws@npm:4.38.1 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-a0aa2f5e/build.log) ➤ YN0009: │ protobufjs@npm:6.11.2 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-c9a7ba34/build.log) ➤ YN0000: └ Completed in 8s 950ms ➤ YN0000: Failed with errors in 1m 25s

SYSTEM INFORMATION:

Operating System: linux Node: 12.13.0 Yarn: 3.2.1 create-webiny-project: 5.26.0 Template: @webiny/[email protected] Template Options: {}

Please open an issue including the error output at https://github.com/webiny/webiny-js/issues/new. You can also get in touch with us on our Slack Community: https://www.webiny.com/slack

Writing log to /home/ec2-user/webiny/cwp-logs.txt... Cleaning up generated files and folders... Done.

A command line run of "yarn --version" shows "1.22.18", yet the output above says "3.2.1".

Dr. Google is not much help, but I'll keep plugging away at it.

Thanks for the help.

thoughtAddict avatar May 19 '22 01:05 thoughtAddict

I'm able to get beyond that item, (it helps adding the new EC2 I spun up to the ALB Target Group).

But now I'm hitting the same brick wall as all the previous attempts:

yarn webiny deploy

Internal Error: Assertion failed: Expected workspace api-file-manager-download (/home/ec2-user/webiny/webiny-test/api/code/fileManager/download/package.json) to have been resolved. Run "yarn install" to update the lockfile at ze.refreshWorkspaceDependencies (/home/ec2-user/webiny/webiny-test/.yarn/releases/yarn-3.2.1.cjs:442:3811) at ze.restoreInstallState (/home/ec2-user/webiny/webiny-test/.yarn/releases/yarn-3.2.1.cjs:448:1240) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Pm.execute (/home/ec2-user/webiny/webiny-test/.yarn/releases/yarn-3.2.1.cjs:575:1879) at async Pm.validateAndExecute (/home/ec2-user/webiny/webiny-test/.yarn/releases/yarn-3.2.1.cjs:350:673) at async ys.run (/home/ec2-user/webiny/webiny-test/.yarn/releases/yarn-3.2.1.cjs:364:2087) at async JN.execute (/home/ec2-user/webiny/webiny-test/.yarn/releases/yarn-3.2.1.cjs:475:531) at async JN.validateAndExecute (/home/ec2-user/webiny/webiny-test/.yarn/releases/yarn-3.2.1.cjs:350:673) at async ys.run (/home/ec2-user/webiny/webiny-test/.yarn/releases/yarn-3.2.1.cjs:364:2087) at async ys.runExit (/home/ec2-user/webiny/webiny-test/.yarn/releases/yarn-3.2.1.cjs:364:2271)

Apologies for the length of this thread.

Please let me know if I should close this ticket and open a new for:

Internal Error: Assertion failed: Expected workspace api-file-manager-download

My gut feeling is that this is a Yarn issue.

thoughtAddict avatar May 19 '22 01:05 thoughtAddict

Tried the same commands on an Ubuntu v20.04 and am hitting that same brick wall.

Internal Error: Assertion failed: Expected workspace api-file-manager-download

At this point, I've spent maybe 5 hours trying to get Webiny up and running.

If anyone has an idea of what's going on with this "api-file-manager-download" issue, I'd appreciate if you could share.

thoughtAddict avatar May 19 '22 02:05 thoughtAddict