scalarhq / netlify-plugin-pnpm-preinstaller Goto Github PK
View Code? Open in Web Editor NEWPNPM pre installer plugin for netlify.
License: MIT License
PNPM pre installer plugin for netlify.
License: MIT License
Hello, I was following your steps and get this error, is it something wrong on NPM_FLAGS="--prefix=/dev/null"
? thanks
5:37:28 PM: ############################################### 100.0%
5:37:28 PM: Computing checksum with sha256sum
5:37:29 PM: Checksums matched!
5:37:30 PM: Now using node v8.17.0 (npm v6.13.4)
5:37:31 PM: Attempting ruby version 2.3.6, read from environment
5:37:32 PM: Using ruby version 2.3.6
5:37:32 PM: Using PHP version 5.6
5:37:32 PM: Started restoring cached node modules
5:37:32 PM: Finished restoring cached node modules
5:37:32 PM: Installing NPM modules using NPM version 6.13.4
5:37:33 PM: Error: EEXIST: file already exists, mkdir '/dev/null'
5:37:33 PM: TypeError: Cannot read property 'loaded' of undefined
5:37:33 PM: at exit (/opt/buildhome/.nvm/versions/node/v8.17.0/lib/node_modules/npm/lib/utils/error-handler.js:97:27)
5:37:33 PM: at errorHandler (/opt/buildhome/.nvm/versions/node/v8.17.0/lib/node_modules/npm/lib/utils/error-handler.js:216:3)
5:37:33 PM: at /opt/buildhome/.nvm/versions/node/v8.17.0/lib/node_modules/npm/bin/npm-cli.js:78:20
5:37:33 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
5:37:33 PM: at cb (/opt/buildhome/.nvm/versions/node/v8.17.0/lib/node_modules/npm/lib/npm.js:225:22)
5:37:33 PM: at /opt/buildhome/.nvm/versions/node/v8.17.0/lib/node_modules/npm/lib/npm.js:263:24
5:37:33 PM: at /opt/buildhome/.nvm/versions/node/v8.17.0/lib/node_modules/npm/lib/config/core.js:81:7
5:37:33 PM: at Array.forEach (<anonymous>)
5:37:33 PM: at /opt/buildhome/.nvm/versions/node/v8.17.0/lib/node_modules/npm/lib/config/core.js:80:13
5:37:33 PM: at f (/opt/buildhome/.nvm/versions/node/v8.17.0/lib/node_modules/npm/node_modules/once/once.js:25:25)
When I have this in my netlify.toml
, my netlify builds fail. If I remove it, it works... I also don't see it in this template. Just an FYI. Also thanks for this plugin!
- Point npm to /dev/null:
[build.environment] NPM_FLAGS="--prefix=/dev/null"
Despite having the plugin successfully install PNPM, after it's being installed, when having
[build]
command = "pnpm build"
the Netlify build log will output
12:06:46 AM: bash: pnpm: command not found
12:06:46 AM:
12:06:46 AM: ────────────────────────────────────────────────────────────────
12:06:46 AM: "build.command" failed
12:06:46 AM: ────────────────────────────────────────────────────────────────
12:06:46 AM:
12:06:46 AM: Error message
12:06:46 AM: Command failed with exit code 127: pnpm build
12:06:46 AM:
12:06:46 AM: Error location
12:06:46 AM: In build.command from netlify.toml:
12:06:46 AM: pnpm build
I spotted this in the pnpm thread:
NPM_FLAGS="--version"
Source: https://answers.netlify.com/t/using-pnpm-and-pnpm-workspaces/2759/16
Possibly more reliable and quicker than the prefix hack?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.