Skip to content

Inlining all files in node_modules folder #28

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

Open
robnewton opened this issue Jan 25, 2021 · 0 comments
Open

Inlining all files in node_modules folder #28

robnewton opened this issue Jan 25, 2021 · 0 comments

Comments

@robnewton
Copy link

robnewton commented Jan 25, 2021

This takes a few minutes to run and eventually fails with an error that too many files are open. The console shows that it is "inlining" the entire node_modules directory tree. According to the docs it's supposed to only work on functions.

Any ideas what's going on with it scanning the node_modules directory?

Here's the relevant netlify.toml

...
functions = "functions"

[[plugins]]
package = "netlify-plugin-inline-functions-env"

[[redirects]]
...

EDIT: I just noticed that it erased the contents of all function js files as well.

Here's a clip from the part of the logs where it fails

...
inlining C:\Users\Rob\Documents\GitHub\project\node_modules\oauth-1.0a\test\options\realm.js
inlining C:\Users\Rob\Documents\GitHub\project\node_modules\oauth-1.0a\test\options\signature_method.js       
inlining C:\Users\Rob\Documents\GitHub\project\node_modules\oauth-1.0a\test\services\bitbucket.js
inlining C:\Users\Rob\Documents\GitHub\project\node_modules\oauth-1.0a\test\services\flickr.js
inlining C:\Users\Rob\Documents\GitHub\project\node_modules\oauth-1.0a\test\services\openbank.js
inlining C:\Users\Rob\Documents\GitHub\project\node_modules\oauth-1.0a\test\services\twitter.js
inlining C:\Users\Rob\Documents\GitHub\project\node_modules\oauth-1.0a\test\twitter_sample_data.js

────────────────────────────────────────────────────────────────
  Plugin "netlify-plugin-inline-functions-env" failed
────────────────────────────────────────────────────────────────

  Error message
  Error: Failed to inline function files due to the following error:
  EMFILE: too many open files, open 'C:\Users\Rob\Documents\GitHub\project\node_modules\lodash\_baseFlatten.js'
  EMFILE: too many open files, open 'C:\Users\Rob\Documents\GitHub\project\node_modules\lodash\_baseFlatten.js'

  Plugin details
  Package:        netlify-plugin-inline-functions-env
  Version:        1.0.8
  npm link:       https://www.npmjs.com/package/netlify-plugin-inline-functions-env
  Report issues:  https://github.com/bencao/netlify-plugin-inline-functions-env/issues

  Error location
  In "onPreBuild" event in "netlify-plugin-inline-functions-env" from netlify.toml

  Resolved config
  build:
    command: npm run build
    commandOrigin: config
    functions: C:\Users\Rob\Documents\GitHub\project\functions
    publish: C:\Users\Rob\Documents\GitHub\project\build
  plugins:
    - inputs: {}
      origin: config
      package: netlify-plugin-inline-functions-env
  redirects:
    - force: true
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