Comments (7)
I see. Yeah, that scenario is not supported by prebuildify-cross
. It can only mount one node_modules
folder in the Docker container, and expects all dependencies to be there.
from prebuildify-cross.
Sounds good! PR welcome.
from prebuildify-cross.
Did you run npm install --save-dev prebuildify node-gyp prebuildify-cross
?
The Error: canceled
error comes from https://github.com/npm/cli/blob/v8.19.2/workspaces/libnpmexec/lib/index.js#L230 and got an improved message in a later version of npm: npm/cli@02c7ddb. It indicates that dependencies are missing.
from prebuildify-cross.
I installed the dependencies you have mentioned in the root of my lerna project and in the package itself. Both does not work. The problem is that npm workspaces installs them on the root node_modules folder. I guess that's why a dependency cannot be found.
from prebuildify-cross.
Would you accept a pull request? I can take a look
from prebuildify-cross.
What solution do you suggest?
from prebuildify-cross.
I would add a second volume which overrides the node_modules folder.
const child = dockerRun(image, {
entrypoint: 'node',
argv: ['-'].concat(argv),
remove: false,
volumes: {
// Should but can't use :ro (mafintosh/docker-run#12)
[cygwin(cwd)]: '/input',
[path.join(cwd, '..', '..', 'node_modules')]: '/input/node_modules'
},
env: {
PREBUILDIFY_CROSS_FILES: files,
// Disable npm update check
NO_UPDATE_NOTIFIER: 'true'
}
})
If you pass an argv argument e.g. --node-modules-path /absolute/path/to/node_modules
we will add the second volume, otherwise by default there is only one volume.
from prebuildify-cross.
Related Issues (10)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prebuildify-cross.