Open ivanovvitaly opened 9 hours ago
Hey, thanks for raising this! I'm going to transfer this over to our JS repository for better assistance 🙂
Hi @ivanovvitaly thank you for opening this issue.
I did a quick test with creating a new Vue starter app, and I couldn't reproduce this issue. I've taken the following steps:
npm create vue@latest
npm install aws-amplify
main.ts
using the code example you providednpm run build
succeeded with the following output❯ npm run build
> test-build@0.0.0 build
> run-p type-check "build-only {@}" --
> test-build@0.0.0 type-check
> vue-tsc --build --force
> test-build@0.0.0 build-only
> vite build
vite v5.4.11 building for production...
✓ 585 modules transformed.
dist/index.html 0.43 kB │ gzip: 0.29 kB
dist/assets/AboutView-CSIvawM9.css 0.09 kB │ gzip: 0.10 kB
dist/assets/index-5dJgFXHu.css 4.21 kB │ gzip: 1.30 kB
dist/assets/AboutView-6XaiO942.js 0.23 kB │ gzip: 0.20 kB
dist/assets/index-Dsxzz0b4.js 145.63 kB │ gzip: 53.13 kB
✓ built in 854ms
In noticed that you are using @vue/cli-service
which is already in the maintenance mode, and your typescript version is quite low (may have compatibility issue with @types/node
(not particular the aws-amplify packages)). Could you try to upgrade your Vue tooling and try again?
Hey @HuiSF, thanks for quick feedback! I tried clean vue 3 with vite template it builds without issues. The initial project was setup with vue 3 with webpack . Can I make it work with webpack?
@ae-vivanov, that's great to hear that it's now building without issues using Vite. We don't think webpack is the issue here, but rather Typescript. Did you also upgrade the version of typescript as well before trying the webpack build again?
Describe the bug I installed aws-amplify npm package to the clean vue 3 project and added Amplify import. When I run
npm run build
I get long list of errors,npm run serve
runs without errors though. If I remove aws-amplify import statement the project compiles without errors. Please adviceTo Reproduce Steps to reproduce the behavior:
import { Amplify } from 'aws-amplify';
npm run build
Expected behavior Project should compile without errors
Desktop (please complete the following information):
Additional context
main.ts
package.json