Hey everyone, I am dealing with strange issue where a plugin netlify-plugin-fetch-feeds breaks the build process completely out of the blue.
Facts:
The build process started to fail today, Feb 1 '22.
Build process is triggered simply on repository change.
There were no breaking changes in the repository as far as I can tell. Content is managed via Forestry commits, but that was safe for years and does not seem related at all.
Plugin does not seem to be the culprit too β itβs simple in nature and was last updated in Apr '20. Worked nicely til yesterday.
I tried to clear the cache and deploy fresh build several times.
Project uses Tailwind and as such requires Node v12 to compile.
Both package.json and .nvmrc specifically ask for Node v12.
I have two sites with similar setup which are affected, both started acting up at the same time.
So if Iβm reading below log right, plugin relies on dependency compiled for a different Node.
Given above, how that can be? Why all of a sudden?
Is there anything I can do from where I stand?
6:38:03 PM: β― Loading plugins
6:38:03 PM: - netlify-plugin-fetch-feeds@0.2.3 from netlify.toml
6:38:04 PM: β
6:38:04 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
6:38:04 PM: Plugin "netlify-plugin-fetch-feeds" internal error
6:38:04 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
6:38:04 PM: β
6:38:04 PM: Error message
6:38:04 PM: Could not import plugin:
6:38:04 PM: Error: The module '/opt/build/repo/.netlify/plugins/node_modules/node-expat/build/Release/node_expat.node'
6:38:04 PM: was compiled against a different Node.js version using
6:38:04 PM: NODE_MODULE_VERSION 72. This version of Node.js requires
6:38:04 PM: NODE_MODULE_VERSION 93. Please try re-compiling or re-installing
6:38:04 PM: the module (for instance, using `npm rebuild` or `npm install`).
6:38:04 PM: β
6:38:04 PM: Plugin details
6:38:04 PM: Package: netlify-plugin-fetch-feeds
6:38:04 PM: Version: 0.2.3
6:38:04 PM: Repository: git+https://github.com/philhawksworth/netlify-plugin-fetch-feeds.git
6:38:04 PM: npm link: https://www.npmjs.com/package/netlify-plugin-fetch-feeds
6:38:04 PM: Report issues: https://github.com/philhawksworth/netlify-plugin-fetch-feeds/issues
6:38:04 PM: β
6:38:04 PM: Error location
6:38:04 PM: While loading "netlify-plugin-fetch-feeds" from netlify.toml
6:38:04 PM: at Object.Module._extensions..node (node:internal/modules/cjs/loader:1183:18)
6:38:04 PM: at Module.load (node:internal/modules/cjs/loader:981:32)
6:38:04 PM: at Function.Module._load (node:internal/modules/cjs/loader:822:12)
6:38:04 PM: at Module.require (node:internal/modules/cjs/loader:1005:19)
6:38:04 PM: at require (node:internal/modules/cjs/helpers:102:18)
6:38:04 PM: at bindings (/opt/build/repo/.netlify/plugins/node_modules/bindings/bindings.js:112:48)
6:38:04 PM: at Object.<anonymous> (/opt/build/repo/.netlify/plugins/node_modules/node-expat/lib/node-expat.js:4:34)
6:38:04 PM: at Module._compile (node:internal/modules/cjs/loader:1101:14)
6:38:04 PM: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
6:38:04 PM: at Module.load (node:internal/modules/cjs/loader:981:32)
6:38:04 PM: β
6:38:04 PM: Error properties
6:38:04 PM: { code: 'ERR_DLOPEN_FAILED' }
6:38:04 PM: β
6:38:04 PM: Resolved config
6:38:04 PM: build:
6:38:04 PM: command: bundle exec jekyll pagemaster recipes && npm run build
6:38:04 PM: commandOrigin: config
6:38:04 PM: publish: /opt/build/repo/_site
6:38:04 PM: publishOrigin: config
6:38:04 PM: plugins:
6:38:04 PM: - inputs: {}
6:38:04 PM: origin: config
6:38:04 PM: package: netlify-plugin-fetch-feeds
Thanks so much for such a well written post! Sorry to hear you are encountering this obstacle.
We can definitely look into this further for you. Can you share your project repo as well as your full deploy log? If your project repo isnβt public, could you share you netlify.toml file?
The build plugins use a different Node Version and this is non-configurable. Recently, we started using Node 16 for plugins ONLY if the site uses Node version less than 12.20.0. Could you try updating the siteβs Node version to see if this works for you?
Another possible approach could also be to install the plugin to your siteβs package.json. The plugin will be installed alongside your siteβs dependencies and then use your preferred Node.js version (12) instead of Node 16. This might solve your above problem. Please let us know if this works!
Thatβs good to know, thanks! Unfortunately, explicitly setting Node to 12.20 didnβt do much for us. Anyway, are these breaking changes announced somewhere? Would be great to keep ourselves on top of these!
However @ehmicky 's suggestion worked wonders, cheers!
We use the βUpdatesβ tag for this type of announcements (which can be subscribed to). We also really strive to minimize the amount of breaking changes. However, there are a few cases where itβs very difficult to avoid, and this was unfortunately one of them.
Weβre sorry this resulted in some hiccups, but at least it works again now, which is great!