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

build failed #1

Closed
cleesmith opened this issue Oct 21, 2022 · 2 comments
Closed

build failed #1

cleesmith opened this issue Oct 21, 2022 · 2 comments

Comments

@cleesmith
Copy link

Using a repo from this template repo, this happens:
Oct 21 05:45:30 PM [5/5] Building fresh packages...
Oct 21 05:45:31 PM Done in 1.40s.
Oct 21 05:45:47 PM ==> Using Python version: 3.7.10
Oct 21 05:45:53 PM ==> Running build command 'yarn && yarn run build'...
Oct 21 05:45:53 PM yarn install v1.22.19
Oct 21 05:45:53 PM [1/5] Validating package.json...
Oct 21 05:45:53 PM [2/5] Resolving packages...
Oct 21 05:45:53 PM success Already up-to-date.
Oct 21 05:45:53 PM Done in 0.19s.
Oct 21 05:45:54 PM yarn run v1.22.19
Oct 21 05:45:54 PM $ pagecrypt src/index.html dist/index.html $PASSWORD && cp -R src/css dist/
Oct 21 05:45:54 PM file:///opt/render/project/src/node_modules/pagecrypt/cli.js:16
Oct 21 05:45:54 PM const crypto2 = window.crypto || globalThis.crypto;
Oct 21 05:45:54 PM ^
Oct 21 05:45:54 PM
Oct 21 05:45:54 PM ReferenceError: window is not defined
Oct 21 05:45:54 PM at loadCrypto (file:///opt/render/project/src/node_modules/pagecrypt/cli.js:16:21)
Oct 21 05:45:54 PM at file:///opt/render/project/src/node_modules/pagecrypt/cli.js:23:20
Oct 21 05:45:54 PM at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
Oct 21 05:45:54 PM at async Promise.all (index 0)
Oct 21 05:45:54 PM at async ESMLoader.import (node:internal/modules/esm/loader:518:24)
Oct 21 05:45:54 PM at async loadESM (node:internal/process/esm_loader:102:5)
Oct 21 05:45:54 PM at async handleMainPromise (node:internal/modules/run_main:66:12)
Oct 21 05:45:54 PM
Oct 21 05:45:54 PM Node.js v19.0.0
Oct 21 05:45:54 PM error Command failed with exit code 1.
Oct 21 05:45:54 PM info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Oct 21 05:45:54 PM ==> Build failed 😞
... first time this happened was today.
Thanks,
Chris

@BigAlRender
Copy link
Contributor

Hey Chris,

It seems the Node version in the package.json is a little to open:

"engines": {
    "node": ">= 16"
  },

And now that Node 19 is out, there seems to be a compatibility issue with the packages used in the example. I'll look to get that fixed with a more defined version range.

I tried deploying this example with the current LTS Node version (18.12.0) and that appeared to work. You could either update your own package.json (or add a NODE_VERSION env var to your service) that should get your deployed.

@metonym
Copy link

metonym commented Dec 27, 2022

This should be fixed in v6.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants