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

Persistent deploy error on Vercel #133

Open
nelsonvassalo opened this issue Jun 24, 2024 · 0 comments
Open

Persistent deploy error on Vercel #133

nelsonvassalo opened this issue Jun 24, 2024 · 0 comments

Comments

@nelsonvassalo
Copy link

nelsonvassalo commented Jun 24, 2024

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request

Current behavior:
When deploying a production build to Vercel, the plugin causes it to fail every time. The reason is that the repo is marked as type: module to accept ESModules but it seems the package is using CommonJS.

Expected behavior:
A repo can build on production in Vercel.

Steps to reproduce:
Any code push produces a deployment that fails.

Related code:
package.json

"dependencies": {
	"svelte": "^4.2.7",
	"svelte-preprocess": "^5.1.4",
	"tailwindcss": "^3.4.3",
	"vite": "^5.0.3",
	"@sveltejs/kit": "^2.0.0",
	"@sveltejs/vite-plugin-svelte": "^3.1.0",
	"@capacitor/android": "^6.0.0",
	"@capacitor/camera": "^6.0.0",
	"@capacitor/cli": "^6.0.0",
	"@capacitor/core": "^6.0.0",
	"@capacitor/geolocation": "^6.0.0",
	"@capacitor/ios": "^6.0.0",
	"@capacitor/motion": "^6.0.0",
	"@capacitor/preferences": "^6.0.1",
	"@ionic/pwa-elements": "^3.2.2",
	"@sveltejs/adapter-static": "^3.0.1",
	"maplibre-gl": "^4.4.0",
	"rollup": "^4.17.2"
	}

Build log:

/vercel/path0/node_modules/@ionic/pwa-elements/dist/esm/loader.js:1
import { p as promiseResolve, b as bootstrapLazy } from './index-1c5c47b4.js';
^^^^^^
SyntaxError: Cannot use import statement outside a module
    at internalCompileFunction (node:internal/vm:128:18)
    at wrapSafe (node:internal/modules/cjs/loader:1280:20)
    at Module._compile (node:internal/modules/cjs/loader:1332:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at cjsLoader (node:internal/modules/esm/translators:366:17)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:315:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
Emitted 'error' event on Worker instance at:
    at [kOnErrorMessage] (node:internal/worker:326:10)
    at [kOnMessage] (node:internal/worker:337:37)
    at MessagePort.<anonymous> (node:internal/worker:232:57)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:826:20)
    at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28)
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

1 participant