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

BUG: Unable to start astro #185

Closed
stramel opened this issue Jun 11, 2021 · 5 comments
Closed

BUG: Unable to start astro #185

stramel opened this issue Jun 11, 2021 · 5 comments

Comments

@stramel
Copy link

stramel commented Jun 11, 2021

Describe the bug:

Astro doesn't start with the nodejs container

Link to the blitz that caused the error
https://stackblitz.com/edit/node-rugych?devtoolsheight=33&file=package.json

Steps to reproduce:

  1. Run npm start
  2. See error

Expected behavior:

I would expect astro to start up the dev server

Version of webcontainer:
Hash: cb1eb6b301af424e8dffb694972509f06ea6b5db

Screenshots:

image

Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
performance.memory = {
"totalJSHeapSize": 65595188,
"usedJSHeapSize": 57498364,
"jsHeapSizeLimit": 4294705152
}

Additional context:

Would love to see Astro as a template on the main page :)

@fvsch
Copy link

fvsch commented Jun 11, 2021

Thanks for the report @stramel.

It looks like Astro uses ESM throughout, and we don't currently support ESM (see #6).

@stramel
Copy link
Author

stramel commented Jun 11, 2021

@fvsch Thanks! Will be very excited to see ESM and Astro support!

@natemoo-re
Copy link

Astro maintainer here! Just wanted to jump in and say that we're extremely excited about the potential here. If there's anything needed on our side, please don't hesitate to reach out.

@stramel
Copy link
Author

stramel commented Aug 5, 2021

@fvsch I noticed that ESM is now supported (#6). I was able to get a bit further but there is still an issue getting Astro running.

This is the error that I get:

Details
~/projects/node-rugych 16s
❯ npm start
$ astro dev
[01:44:30] [snowpack] Welcome to Snowpack! Because this is your first time running
this project, Snowpack needs to prepare your dependencies. This is a one-time step
and the results will be cached for the lifetime of your project. Please wait...
(node:26) UnhandledPromiseRejectionWarning: TypeError: Failed to fetch dynamically imported module: https://node-rugych.jw.staticblitz.com/dist/compiler/index.js
(Use `node --trace-warnings ...` to show where the warning was created)
(node:26) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:26) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Error: esbuild: Failed to install correctly

Make sure you don't have "ignore-scripts" set to true. You can check this with
"npm config get ignore-scripts". If that returns true you can reset it back to
false using "npm config set ignore-scripts false" and then reinstall esbuild.

If you're using npm v7, make sure your package-lock.json file contains either
"lockfileVersion": 1 or the code "hasInstallScript": true. If it doesn't have
either of those, then it is likely the case that a known bug in npm v7 has
corrupted your package-lock.json file. Regenerating your package-lock.json file
should fix this issue.

    at Object.eval (/home/projects/node-rugych/node_modules/snowpack/node_modules/esbuild/bin/esbuild:1:68)
    at Object.function (https://node-rugych.jw.staticblitz.com/blitz.4e4ea319cbd3a0d75df10c54934ef2212dce90a2.js:11:115171)
    at Module._compile (https://node-rugych.jw.staticblitz.com/blitz.4e4ea319cbd3a0d75df10c54934ef2212dce90a2.js:6:189170)
    at Object.Module._extensions..js (https://node-rugych.jw.staticblitz.com/blitz.4e4ea319cbd3a0d75df10c54934ef2212dce90a2.js:6:189529)
    at Module.load (https://node-rugych.jw.staticblitz.com/blitz.4e4ea319cbd3a0d75df10c54934ef2212dce90a2.js:6:187609)
    at Function.Module._load (https://node-rugych.jw.staticblitz.com/blitz.4e4ea319cbd3a0d75df10c54934ef2212dce90a2.js:6:185151)
    at Function.executeUserEntryPoint [as runMain] (https://node-rugych.jw.staticblitz.com/blitz.4e4ea319cbd3a0d75df10c54934ef2212dce90a2.js:6:704138)
    at Object.a0_0x5dad (https://node-rugych.jw.staticblitz.com/blitz.4e4ea319cbd3a0d75df10c54934ef2212dce90a2.js:6:1252656)
    at _0x5116f3 (https://node-rugych.jw.staticblitz.com/blitz.4e4ea319cbd3a0d75df10c54934ef2212dce90a2.js:8:23894)
    at _0x598863 (https://node-rugych.jw.staticblitz.com/blitz.4e4ea319cbd3a0d75df10c54934ef2212dce90a2.js:11:52977)
(node:26) UnhandledPromiseRejectionWarning: Error: Could not load /home/projects/node-rugych/node_modules/svelte/internal/index.mjs: The service was stopped
    at eval (/home/projects/node-rugych/node_modules/snowpack/node_modules/esbuild/lib/main.js:1066:33)
    at eval (/home/projects/node-rugych/node_modules/snowpack/node_modules/esbuild/lib/main.js:568:9)
    at Socket.afterClose (/home/projects/node-rugych/node_modules/snowpack/node_modules/esbuild/lib/main.js:546:7)
    at Socket.EventEmitter.emit (https://node-rugych.jw.staticblitz.com/blitz.4e4ea319cbd3a0d75df10c54934ef2212dce90a2.js:6:126670)
    at endReadableNT (https://node-rugych.jw.staticblitz.com/blitz.4e4ea319cbd3a0d75df10c54934ef2212dce90a2.js:6:491189)
    at https://node-rugych.jw.staticblitz.com/blitz.4e4ea319cbd3a0d75df10c54934ef2212dce90a2.js:11:129623
    at https://node-rugych.jw.staticblitz.com/blitz.4e4ea319cbd3a0d75df10c54934ef2212dce90a2.js:11:195347
    at _0x501720 (https://node-rugych.jw.staticblitz.com/blitz.4e4ea319cbd3a0d75df10c54934ef2212dce90a2.js:11:195583)
    at MessagePort._0x21c56e.<computed>.<computed> (https://node-rugych.jw.staticblitz.com/blitz.4e4ea319cbd3a0d75df10c54934ef2212dce90a2.js:11:195736)
(node:26) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

@jrvidal
Copy link
Contributor

jrvidal commented Aug 5, 2021

@stramel @natemoo-re Though the symptoms are somewhat different, this is most likely related to #281. (Feel free to comment if it needs to be reopened)

@jrvidal jrvidal closed this as completed Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants