Closed phhoef closed 2 years ago
Thanks for finding this bug and the solution.
Is this by design or should both dependencies moved from devDependencies to dependencies?
According to prebuild documentation, only prebuild-install
is mandatory dependency, moreover at application level. The installation should therefore work like:
npm i --only=prod prebuild-install node-rfc
or
package.json
"dependencies": {
"node-rfc": "^2.6.0",
"prebuild-install": "^7.0.1"
}
Could you please check it it works in your environment?
I would move only prebuild-install
to dependencies (from dev dependencies) because cmake-js
requires native CMake which can't be installed "on the fly", together with other dependencies.
Would it work for your scenario?
Hallo @bsrdjan, thanks for your quick reply.
I can confirm, that adding prebuild-install
to the dependencies
is sufficient.
Describe the bug When trying to install the dependency only with not
devDependencies
an error is raised. When onlynpm install
is called, the installation is working.To Reproduce Create a new project with npm. Add
node-rfc
as dependency. Delete thenode_modules
folder and runnpm install --only=prod
When adding the following two dependencies to my
dependencies
it is working:prebuilt-install
cmake-js
Is this by design or should both dependencies moved from
devDependencies
todependencies
?Environment
node -p "require('node-rfc').environment"