You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first time I see this error. I did a fresh clone on my machine and cannot reproduce this.
Did npm install complete without errors? You can run npm run clean and then npm install again, just to make sure. Also, you could try switching/updating your node version.
If the error persists, probably best to open an issue on the Astro repo, as the error occurs in the Astro image integration.
@mhyfritz would it be possible to upgrade this template to use the astro:assets feature? It is replacing the @astrojs/image integration, so it'd be great to get everyone started off on the right foot. Here's the upgrade guide.
Hi,
Have cloned the entire project.
Run the commands:
npm install
npm run dev
Visiting http://localhost:3000/
I receive the following error message on the webpage:
Error An error occurred. Parse failure: Unexpected token (81:70) At file: /node_modules/@astrojs/image/dist/lib/get-image.js Contents of line 81: const isDev = (_b = (Object.assign(import.meta.env,{_:process.env._,-:process.env.-,SSR:true,}))) == null ? void 0 : _b.DEV;
And the following error message on terminal
`
Parse failure: Unexpected token (81:70)
At file: /node_modules/@astrojs/image/dist/lib/get-image.js
Contents of line 81: const isDev = (b = (Object.assign(import.meta.env,{:process.env._,-:process.env.-,SSR:true,}))) == null ? void 0 : b.DEV;
Parse failure: Unexpected token (81:70)
At file: /node_modules/@astrojs/image/dist/lib/get-image.js
Contents of line 81: const isDev = (b = (Object.assign(import.meta.env,{:process.env.,-:process.env.-,SSR:true,}))) == null ? void 0 : b.DEV; (x2)
7:13:10 pm [vite] Error when evaluating SSR module /node_modules/@astrojs/image/dist/index.js: failed to import "/node_modules/@astrojs/image/dist/lib/get-image.js"
|- Error: Parse failure: Unexpected token (81:70)
At file: /node_modules/@astrojs/image/dist/lib/get-image.js
Contents of line 81: const isDev = (b = (Object.assign(import.meta.env,{:process.env.,-:process.env.-,SSR:true,}))) == null ? void 0 : _b.DEV;
at ssrTransformScript (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53776:15)
at ssrTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53751:12)
at Object.ssrTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:63307:20)
at loadAndTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53422:24)
7:13:10 pm [vite] Error when evaluating SSR module /node_modules/@astrojs/image/components/Image.astro: failed to import "/node_modules/@astrojs/image/dist/index.js"
|- Error: Parse failure: Unexpected token (81:70)
At file: /node_modules/@astrojs/image/dist/lib/get-image.js
Contents of line 81: const isDev = (b = (Object.assign(import.meta.env,{:process.env._,-:process.env.-,SSR:true,}))) == null ? void 0 : _b.DEV;
at ssrTransformScript (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53776:15)
at ssrTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53751:12)
at Object.ssrTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:63307:20)
at loadAndTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53422:24)
7:13:10 pm [vite] Error when evaluating SSR module /node_modules/@astrojs/image/components/index.ts: failed to import "/node_modules/@astrojs/image/components/Image.astro"
|- Error: Parse failure: Unexpected token (81:70)
At file: /node_modules/@astrojs/image/dist/lib/get-image.js
Contents of line 81: const isDev = (b = (Object.assign(import.meta.env,{:process.env._,-:process.env.-,SSR:true,}))) == null ? void 0 : _b.DEV;
at ssrTransformScript (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53776:15)
at ssrTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53751:12)
at Object.ssrTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:63307:20)
at loadAndTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53422:24)
7:13:10 pm [vite] Error when evaluating SSR module /src/components/hero-image.astro: failed to import "/node_modules/@astrojs/image/components/index.ts"
|- Error: Parse failure: Unexpected token (81:70)
At file: /node_modules/@astrojs/image/dist/lib/get-image.js
Contents of line 81: const isDev = (b = (Object.assign(import.meta.env,{:process.env._,-:process.env.-,SSR:true,}))) == null ? void 0 : _b.DEV;
at ssrTransformScript (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53776:15)
at ssrTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53751:12)
at Object.ssrTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:63307:20)
at loadAndTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53422:24)
7:13:10 pm [vite] Error when evaluating SSR module /src/components/footer.astro: failed to import "/src/components/hero-image.astro"
|- Error: Parse failure: Unexpected token (81:70)
At file: /node_modules/@astrojs/image/dist/lib/get-image.js
Contents of line 81: const isDev = (b = (Object.assign(import.meta.env,{:process.env._,-:process.env.-,SSR:true,}))) == null ? void 0 : _b.DEV;
at ssrTransformScript (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53776:15)
at ssrTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53751:12)
at Object.ssrTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:63307:20)
at loadAndTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53422:24)
7:13:10 pm [vite] Error when evaluating SSR module /Users/tehnoob/Documents/Work/HiTehnoob/astro-2/src/pages/index.astro: failed to import "/src/components/footer.astro"
|- Error: Parse failure: Unexpected token (81:70)
At file: /node_modules/@astrojs/image/dist/lib/get-image.js
Contents of line 81: const isDev = (b = (Object.assign(import.meta.env,{:process.env._,-:process.env.-,SSR:true,}))) == null ? void 0 : _b.DEV;
at ssrTransformScript (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53776:15)
at ssrTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53751:12)
at Object.ssrTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:63307:20)
at loadAndTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53422:24)
error Parse failure: Unexpected token (81:70)
At file: /node_modules/@astrojs/image/dist/lib/get-image.js
Contents of line 81: const isDev = (b = (Object.assign(import.meta.env,{:process.env._,-:process.env.-,SSR:true,}))) == null ? void 0 : b.DEV;
Error: Parse failure: Unexpected token (81:70)
At file: /node_modules/@astrojs/image/dist/lib/get-image.js
Contents of line 81: const isDev = (b = (Object.assign(import.meta.env,{:process.env.,-:process.env.-,SSR:true,}))) == null ? void 0 : _b.DEV;
at ssrTransformScript (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53776:15)
at ssrTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53751:12)
at Object.ssrTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:63307:20)
at loadAndTransform (file:///Users/tehnoob/Documents/Work/HiTehnoob/astro-2/node_modules/vite/dist/node/chunks/dep-e8f070e8.js:53422:24)`
Was really excited to work with this but I can't even get the project to load on vanilla.
The text was updated successfully, but these errors were encountered: