install fails
Opened this issue ยท 10 comments
standard ubuntu 22.04
node v20.12.0
npm 10.5.0
npm install pymport
leads to:
npm ERR! code 7
npm ERR! path /data/dev/dev/snoot/snoot_pcd/node_modules/pymport
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build && node scripts/patch-prefix.js
What is the workaround to install pymport ?
Post the whole error message, I just tried installing it on the same configuration and it works for me.
As you may have seen from my profile, I am currently living on social welfare because of an extortion involving the French police, judicial system and many open source projects. In order to intimidate me, people are posting simultaneously issues on my project. Currently, they have been trying to post with an ever increasing time difference between those issues so that I stop saying what I am saying at the moment, all while it remains obvious to everyone.
Sorry to hear that, it sounds really crazy ;/
Here is the log file:
2024-03-31T18_06_21_757Z-debug-0.log
Try CXXFLAGS=-fpermissive npm install pymport
to see if it fixes the prolem
Nope, same
Try npm install --verbose --foreground-scripts=true pymport
Yes, this one works, Installed!
Thanks!
But then import fails:
import { pymport, proxify } from 'pymport';
VITE v5.2.7 ready in 149 ms
โ Local: http://localhost:9500/
โ Network: use --host to expose
โ press h + enter to show help
โ [ERROR] No loader is configured for ".html" files: node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html
node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js:86:21:
86 โ return require('./' + command)(self, argvx, callback);
โต ~~~~~~~~~~~~~~
โ [ERROR] Could not resolve "mock-aws-s3"
node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:43:28:
43 โ const AWSMock = require('mock-aws-s3');
โต ~~~~~~~~~~~~~
You can mark the path "mock-aws-s3" as external to exclude it from the bundle, which will remove
this error and leave the unresolved path in the bundle. You can also surround this "require" call
with a try/catch block to handle this failure at run-time instead of bundle-time.
โ [ERROR] Could not resolve "aws-sdk"
node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:76:22:
76 โ const AWS = require('aws-sdk');
โต ~~~~~~~~~
You can mark the path "aws-sdk" as external to exclude it from the bundle, which will remove this
error and leave the unresolved path in the bundle. You can also surround this "require" call with
a try/catch block to handle this failure at run-time instead of bundle-time.
โ [ERROR] Could not resolve "nock"
node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:112:23:
112 โ const nock = require('nock');
โต ~~~~~~
You can mark the path "nock" as external to exclude it from the bundle, which will remove this
error and leave the unresolved path in the bundle. You can also surround this "require" call with
a try/catch block to handle this failure at run-time instead of bundle-time.
08:47:39 [vite] error while updating dependencies:
Error: Build failed with 4 errors:
node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js:86:21: ERROR: No loader is configured for ".html" files: node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html
node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:43:28: ERROR: Could not resolve "mock-aws-s3"
node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:76:22: ERROR: Could not resolve "aws-sdk"
node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:112:23: ERROR: Could not resolve "nock"
at failureErrorWithLog (/data/dev/dev/snoot/snoot_pcd/node_modules/esbuild/lib/main.js:1651:15)
at /data/dev/dev/snoot/snoot_pcd/node_modules/esbuild/lib/main.js:1059:25
at /data/dev/dev/snoot/snoot_pcd/node_modules/esbuild/lib/main.js:1527:9
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Should I open an other issue ?
No, you are trying to load pymport
which is a Node.js addon into a web project. This does not work.
Oh yes, sorry