Basic local plugin failing on Netlify

Hello,

I was playing around with plugins, so I tried to create one, everything work as expected locally but once I pushed it to production it fails; I made a lot of changes and nothing seems to work, so I create a very basic plugin just to check if something wrong with my code and it fails too :exploding_head:, so this is surely something on Netlify side :slightly_frowning_face:

local-plugin/index.js

// index.js

export const onPreBuild = async () => {
  console.log("TEST");
};

local-plugin/manifest.yml

# manifest.yml

name: local-plugin

local-plugin/package.json

{
 "name": "local-plugin",
 "type": "module",
 "version": "1.0.0",
 "description": "",
 "main": "index.js",
 "author": "sidati",
 "license": "ISC"
}

so locally the plugin print TEST as expected when running netlify dev build command

But once I pushed this code to Production, the build failed

I spend too much time trying solve this but when I removed all my code and used a very basic one and the issue still there, I figure maybe the guys from Netlify has an idea :slight_smile:

I also delete my entire site and create it again just to make sure all rocks are turned :frowning:

Hope you can help :pray:

What site is this? If you’re using Node 18, this is expected to fail. Try using Node 16.

1 Like