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

[fluence-js] unable to compile nor on Node 12 nor on 11 #769

Closed
lcoenen opened this issue Aug 3, 2019 · 2 comments
Closed

[fluence-js] unable to compile nor on Node 12 nor on 11 #769

lcoenen opened this issue Aug 3, 2019 · 2 comments
Assignees
Labels
bug type: bug ~fluence-js component: fluence-js js tech: js

Comments

@lcoenen
Copy link

lcoenen commented Aug 3, 2019

Hi!

So, I'm trying to integrate Fluence into Next.js, and I get this error when I'm trying to install the library with Node 12.7.0:

In file included from ../src/node-boilerplate/scrypt_params_async.cc:4:
../src/node-boilerplate/inc/scrypt_params_async.h:35:36: error: too few arguments to function call, single argument 'context' was not specified
      maxtime(info[0]->NumberValue()),
              ~~~~~~~~~~~~~~~~~~~~ ^

(among other, the context error here).

It might because according to that, fsevents is faulty in version below 1.2.8. I tried to yarn add fsevents@1.2.9, without success.

I also tried to use node 11, but then I get an error in node_modules/fluence/dist/fluence.js because of the ES2015 imports (Unexpected token { at ...).

Any pointers?

@folex
Copy link
Member

folex commented Aug 9, 2019

Please use the latest Fluence version (0.3.4 as of now), it has been updated to be compatible with nextjs.

Your next.config.js should look something like this:

const withTM = require('next-transpile-modules');

module.exports = withTM({
    transpileModules: ['fluence']
});

next-transpile-modules can be found here

@folex folex self-assigned this Aug 9, 2019
@folex folex added bug type: bug js tech: js ~fluence-js component: fluence-js labels Aug 9, 2019
@folex
Copy link
Member

folex commented Aug 9, 2019

Closing this as resolved, please let me know if that didn't solve your problem

@folex folex closed this as completed Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug type: bug ~fluence-js component: fluence-js js tech: js
Projects
None yet
Development

No branches or pull requests

2 participants