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

TypeError: plugin.startsWith is not a function #373

Open
tult98 opened this issue Feb 21, 2024 · 1 comment
Open

TypeError: plugin.startsWith is not a function #373

tult98 opened this issue Feb 21, 2024 · 1 comment

Comments

@tult98
Copy link

tult98 commented Feb 21, 2024

Node: v20.11.0
[email protected]

I'm trying to tell Vercel when to rebuild the app with nx-ignore but end up with this error when running npx nx-ignore <project-name>

I'm setting it like this on Vercel dashboard

image

Here is the full log from Vercel

[15:13:53.260] Running "npx nx-ignore web"
[15:13:54.160] npm WARN exec The following package was not found and will be installed: [email protected]
[15:13:54.603] ≫ Using Nx to determine if this project (web) is affected by the commit...
[15:13:54.607] /vercel/.npm/_npx/cf7fc04e3df2a243/node_modules/nx-ignore/src/index.js:83
[15:13:54.607]     return (_nxJson_plugins_filter = (_nxJson_plugins = nxJson.plugins) == null ? void 0 : _nxJson_plugins.filter((plugin)=>!plugin.startsWith('.'))) != null ? _nxJson_plugins_filter : [];
[15:13:54.607]                                                                                                                                     ^
[15:13:54.607] 
[15:13:54.607] TypeError: plugin.startsWith is not a function
[15:13:54.608]     at /vercel/.npm/_npx/cf7fc04e3df2a243/node_modules/nx-ignore/src/index.js:83:133
[15:13:54.608]     at Array.filter (<anonymous>)
[15:13:54.608]     at findThirdPartyPlugins (/vercel/.npm/_npx/cf7fc04e3df2a243/node_modules/nx-ignore/src/index.js:83:108)
[15:13:54.608]     at main (/vercel/.npm/_npx/cf7fc04e3df2a243/node_modules/nx-ignore/src/index.js:39:71)
[15:13:54.608]     at Object.<anonymous> (/vercel/.npm/_npx/cf7fc04e3df2a243/node_modules/nx-ignore/src/index.js:27:1)
[15:13:54.608]     at Module._compile (node:internal/modules/cjs/loader:1376:14)
[15:13:54.608]     at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
[15:13:54.608]     at Module.load (node:internal/modules/cjs/loader:1207:32)
[15:13:54.608]     at Module._load (node:internal/modules/cjs/loader:1023:12)
[15:13:54.608]     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
[15:13:54.608] 
[15:13:54.608] Node.js v20.11.0
[15:13:54.889] Running "vercel build"
[15:13:55.387] Vercel CLI 33.5.1

I've tried to run the command on my local machine M1 but still get that issue with both node v16 and v20.

@3kumar
Copy link

3kumar commented Apr 4, 2024

We are also facing a similar issue. When we make a git push the nx-ignore forces the vercel deployment to fail.

However, if we redeploy the same commit from Vercel dashboard, it gets built and deployed successfully.

Node.js @ v20.11.1
Vercel cli @33.6.2
pnpm @ 8.15.5
nx-ignore @ 18.0.2
[email protected]

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

2 participants