This error came when I created gatsby-default-starter site. How to solve it. What is the problem with it?
Error message:
‼ pngquant pre-build test failed i compiling from source × Error: pngquant failed to build, make sure that libpng-dev is installed at D:\gatsby-project\my-gatsby-project\node_modules\bin-build\node_modules\execa\index.js:231:11 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Promise.all (index 0) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.13 (node_modules\webpack-dev-server\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.3.2 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! pngquant-bin#6.0.0 postinstall: node lib/install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pngquant-bin#6.0.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
ERROR
Command failed with exit code 1: npm install
Error: Command failed with exit code 1: npm install
error.js:56 makeError [npm]/[gatsby-cli]/[execa]/lib/error.js:56:11
index.js:114 handlePromise [npm]/[gatsby-cli]/[execa]/index.js:114:26
task_queues.js:93 processTicksAndRejections internal/process/task_queues.js:93:5
init-starter.js:135 install [npm]/[gatsby-cli]/lib/init-starter.js:135:7
init-starter.js:202 clone [npm]/[gatsby-cli]/lib/init-starter.js:202:3
init-starter.js:343 initStarter [npm]/[gatsby-cli]/lib/init-starter.js:343:5
create-cli.js:494 [npm]/[gatsby-cli]/lib/create-cli.js:494:9
It seems that you are using Windows as OS. This issue is usually related to some additional dependencies that you may need. Try the following:
Delete your project (to avoid potentially corrupted dependencies).
Install the windows-build-tools by:
npm install --global windows-build-tools --vs2015
Run your starter command and develop it. For example:
npm install -g gatsby-cli
gatsby new gatsby-site
cd gatsby-site
gatsby develop
If the issue persists try installing manually the missing dependencies by:
npm install imagemin-pngquant#5.0.1 --save
npm install pngquant-bin#3.1.1 --save
For further details check Gatsby on Windows docs.
Related
I was using firebase CLI for testing my cloud firestore security rules and I received the following error while installing #firebase/testing using npm install #firebase/testing --save-dev-
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
> core-js#3.6.5 postinstall E:\Coding\Web\poll-app firebase test\test\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"
internal/modules/cjs/loader.js:967
throw err;
^
Error: Cannot find module 'E:\Coding\Web\poll-app firebase test\test\node_modules\core-js\-e'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:964:15)
at Function.Module._resolveFilename (pkg/prelude/bootstrap.js:1346:46)
at Function.Module._load (internal/modules/cjs/loader.js:840:27)
at Function.Module.runMain (pkg/prelude/bootstrap.js:1375:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm WARN test#1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! core-js#3.6.5 postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the core-js#3.6.5 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Can someone tell me what I should be doing?
So, I could fix it by doing the following. I went to my firebase console and opened a cloud shell from security rules playground option. Once it had loaded, I followed the steps given by the learning assistant shown on the right panel and set up my cloud shell by cloning the tutorials from GitHub. Then, I went to quickstart-testing/cs-walkthrough/functions and downloaded the node_modules folder. It was download as a tar file. I ran WinRAR with admin privileges and extracted the tar file. And it worked. I really don't understand how and why it worked but this is what I did to solve the problem.
I am installing nest.js on CentOS 7. I get this error:
file:///usr/lib/node_modules/#nestjs/cli/node_modules/#nuxtjs/opencollective/src/index.js:7
;(async () => {
^
SyntaxError: Unexpected token (
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.2 (node_modules/#nestjs/cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 3.10.0-693.21.1.el7.x86_64
npm ERR! argv "/usr/bin/node" "/bin/npm" "i" "-g" "#nestjs/cli"
npm ERR! node v6.14.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! #nestjs/cli#5.5.0 postinstall: `opencollective`
npm ERR! Exit status 1
Any idea?
The answer lies right in the error message:
npm ERR! node v6.14.3
Not sure which version of nest.js you are trying to install, but the current version has this requirement:
"engines": {
"node": ">= 8.9.0"
},
See official nest.js packages.json.
This works on my centos 7. The command that I used are
[root#yellowdog ~]# npm install -g #nestjs/cli
/usr/bin/nest -> /usr/lib/node_modules/#nestjs/cli/bin/nest.js
> #nestjs/cli#5.5.0 postinstall /usr/lib/node_modules/#nestjs/cli
> opencollective
Thanks for installing nest 🙏
Please consider donating to our open collective
to help us maintain this package.
Number of contributors: 54
Number of backers: 97
Annual budget: US$ 37,495
Current balance: US$ 246
👉 Become a partner: https://opencollective.com/nest/donate
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/#nestjs/cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ #nestjs/cli#5.5.0
added 215 packages from 173 contributors in 20.529s
[root#yellowdog ~]# node -v
v8.11.4
[root#yellowdog ~]# npm -v
6.4.1
[root#yellowdog ~]# nest --version
5.5.0
C:\Users\neha>npm install -g #angular/cli
C:\Users\neha\AppData\Roaming\npm\ng -> C:\Users\neha\AppData\Roaming\npm\node_modules\#angular\cli\bin\ng
#angular/cli#6.0.8 postinstall C:\Users\neha\AppData\Roaming\npm\node_modules\#angular\cli
node ./bin/ng-update-message.js
npm WARN rollback Rolling back node-pre-gyp#0.10.0 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'C:\Users\neha\AppData\Roaming\npm\node_modules\#angular\cli\node_modules\fsevents\node_modules'
npm WARN rollback Rolling back needle#2.2.0 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\Users\neha\AppData\Roaming\npm\node_modules\#angular\cli\node_modules\fsevents\node_modules'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\#angular\cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
#angular/cli#6.0.8
updated 1 package in 37.347s
C:\Users\neha>ng
'ng' is not recognized as an internal or external command,
operable program or batch file.
Just add %AppData%\npm; to the user variable(since %AppData% dir is depending on user) PATH to fix it.
Related issue on Github
You only need to link it to npm using npm link #angular/cli
that worked for me
I would need your help in resolving below error.
I am trying to build an angular project with mariasql as it is the backend db
In order to do that: I tried following steps
Step-1: I installed windows production tool with following command
line as maria db requires Microsoft Visual studio compiler
`"npm install --global windows-build-tools"`
After step-1, I have got visual studio and python 2.7 in my laptop when i installed the global windows build tools
Step-2: I set PYTHON Environment variable in my system
Step 3: I created a brand new angular project like below
ng new selenium-package
The project got created with node_modules
Step 4: I tried installing marialsql as below
npm install mariasql
With this, I am getting below error:
C:\Users\Jack\Documents\Tuitorial\Exercise\selenium-package\node_modules\mariasql> if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "node C:\Users\Jack\Documents\Tuitorial\Exercise\selenium-automation-builder\node_modules\node-gyp\bin\node-gyp.js" rebuild ) module.js:557
throw err;
^
Error: Cannot find module 'C:\Users\Jack\Documents\Tuitorial\Exercise\selenium-package\node_modules\mariasql\node C:\Users\Jack\Documents\Tuitorial\Exercise\selenium-automation-builder\node_modules\node-gyp\bin\node-gyp.js'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Function.Module.runMain (module.js:701:10)
at startup (bootstrap_node.js:194:16)
at bootstrap_node.js:618:3 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! mariasql#0.2.6 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the mariasql#0.2.6 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Jack\AppData\Roaming\npm-cache\_logs\2017-12-22T04_49_00_804Z-debug.log
I am trying to install firebase-tools, but I am getting following error
root#dell-Inspiron-3542:/home/dell# npm install -g firebase-tools
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: async#1.0.0 (node_modules/firebase-tools/node_modules/#google-cloud/functions-emulator /node_modules/async):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: sha1-+PwEyjoTeErenhZBr5hXjPvWR6k= integrity checksum failed when using sha1: wanted sha1-+PwEyjoTeErenhZBr5hXjPvWR6k= but got sha1-MFWnerUOFFoQ4RGVO5qRs6aDFew=. (13270 bytes)
npm ERR! code EINTEGRITY
npm ERR! sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= integrity checksum failed when using sha1: wanted sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= but got sha1-C7um0vYsDjQcA9NpIGhvtn7+YU0=. (21377 bytes)
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-09-06T03_26_15_726Z-debug.log
My node version is v8.4.0
npm version is
5.3.0.
note: I use nvm to manage different node versions.