-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
import tfjs-node and build via webpack,babel - error node-pre-gyp #1772
Comments
It seems like webpack is trying to import some objects that are only used during development from node-pre-gyp. 'aws-sdk' in node-pre-gyp is a devDependencies and should not be invoked in your process. Can you try webpack-node-externals and ignore the modules? |
Hi @kangyizhang webpack.config.js
build error
|
The tfjs-node module requires tensorflow C library and node native addon. I don't think webpack would include these artifacts as static assets. |
Thank you very much for your advice. I reinstalled the native TF library, updated packages, cleared the cache, and mainly removed some of the code that the webpack needed (es6 features) to build, and now I run all the logic through node.js and everything works. |
Glad it works. |
@kangyizhang @jakubfrydrych hello , i am struggling with the exact same error I do not understand what do you mean when you say that you have "installed tensorflow library", should i install it from pip or put the Tensorflow C library folder somewhere ? how does tfjs-node know where my tensorflow C library is located ? thank you very much |
I'm getting the same errors. webpack-node-externals didn't help. "devDependencies": { |
Hi, I'm trying to break tfjs-node in vain the next day. When compiling using a webpack, I get errors from the node-pre-gyp package. I tried all possible ways I found in the forums, but nothing helps. I tried downgrading tfjs-node to version 1.2.1, but also without effect. I also tried the node in 8. I import the package according to the example. Is there a bug in building with a webpack with a babel?
TensorFlow.js version
1.2.5
Node version
v10.16.0 (for test try v8.11.3)
OS
macOS Mojave 10.14.5 (18F132)
processor: 2,7 GHz Intel Core i5
BUILD ERRORS
package.json
top of main.js document, import tfjs-node
The text was updated successfully, but these errors were encountered: