since this morning I'm encountering an error in the build process of my React application using Bitbucket Pipelines. Nothing has changed to my applications other than a few tweaks that has should not trigger this error.
When I try to build my app locally I don't get any errors whatsoever. Beneath you can find the error NPM throws in Pipelines.
+ npm run build-debug
npm info it worked if it ends with ok
npm info using npm#2.15.9
npm info using node#v4.6.0
npm info prebuild-debug webplayer#0.1.2
npm info build-debug webplayer#0.1.2
> webplayer#0.1.2 build-debug /opt/atlassian/pipelines/agent/build
> node scripts/build-debug.js
Creating an optimized production build...
Failed to compile.
Module not found: Error: Cannot resolve module 'promise-polyfill' in /opt/atlassian/pipelines/agent/build/node_modules/firebase/app
npm info webplayer#0.1.2 Failed to exec build-debug script
npm ERR! Linux 4.9.16-coreos-r1
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build-debug"
npm ERR! node v4.6.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! webplayer#0.1.2 build-debug: `node scripts/build-debug.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webplayer#0.1.2 build-debug script 'node scripts/build-debug.js'.
npm ERR! This is most likely a problem with the webplayer package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/build-debug.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs webplayer
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls webplayer
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /opt/atlassian/pipelines/agent/build/npm-debug.log
Thanks in advance!
For people having this issue I found a fix.
All of our projects using firebase at our company where not able to get trough bitbucket pipelines or Docker containers. After some research it occurs that for some reason the npm package promise-polyfill doesn't exist anymore in the Node version 4.0.0 registry or something? We updated our container images to Node version 7.9.0 and everything works fine now!
Related
I tried to customize the React front-end of the AWS API Gateway Developer Portal. But when installing the dependencies, the following error is generated.
npm ERR! npm ERR! code 128
npm ERR! npm ERR! An unknown git error occurred
npm ERR! npm ERR! command git --no-replace-objects ls-remote ssh://git#github.com/ev1stensberg/generator.git
npm ERR! npm ERR! command-line line 0: unsupported option "accept-new".
npm ERR! npm ERR! fatal: Could not read from remote repository.
npm ERR! npm ERR!
npm ERR! npm ERR! Please make sure you have the correct access rights
npm ERR! npm ERR! and the repository exists.
I think the problem occurs when installing the "swagger-ui".
I tried the following command and try to install "swagger-ui" manually. But I get the same error.
npm install swagger-ui#github:awslabs/swagger-ui#apigw-fork-v4
npm ERR! npm ERR! code 128
npm ERR! npm ERR! An unknown git error occurred
npm ERR! npm ERR! command git --no-replace-objects ls-remote ssh://git#github.com/ev1stensberg/generator.git
npm ERR! npm ERR! command-line line 0: unsupported option "accept-new".
npm ERR! npm ERR! fatal: Could not read from remote repository.
npm ERR! npm ERR!
npm ERR! npm ERR! Please make sure you have the correct access rights
npm ERR! npm ERR! and the repository exists.
Afterwards I tried installing different versions of "swagger-ui" through npm. But those versions are not compatible with the dev-portal frontend.
Is there someone who customizes the AWS dev-portal front-end by mitigating this dependency error?
Try adding the dependency in the package.json like this
"dependencies": {
"swagger-ui": "git+https://github.com/awslabs/swagger-ui.git#apigw-fork-v4"
}
you can also install it manually like this
npm install https://github.com/awslabs/swagger-ui#apigw-fork-v4
I'm trying to deploy a react.js app to github pages (I'm following this guide https://medium.freecodecamp.com/surge-vs-github-pages-deploying-a-create-react-app-project-c0ecbf317089) but I keep getting the following error when I run npm run deploy
ENOENT: no such file or directory, stat '/Users/name/Documents/Web Dev/100 Web Projects/wikipediaviewer/build'
npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "deploy"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! wikipediaviewer#1.0.0 deploy: `npm run build&&gh-pages -d build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wikipediaviewer#1.0.0 deploy script 'npm run build&&gh-pages -d build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the wikipediaviewer package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run build&&gh-pages -d build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs wikipediaviewer
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls wikipediaviewer
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/name/Documents/Web Dev/100 Web Projects/wikipediaviewer/npm-debug.log
Can anyone pls help me figure out what I am doing wrong? If i run npm run build it builds successfully. Also i didn't use create-react-app to build this app, could that be the issue & what would I have to do to fix it.
It seems like you didn't create a build folder after you ran npm run build, so that you should change gh-pages -d path-to-your-build
I am using windows os. I have no admin rights in the system I am working.
I was following this link https://www.ibm.com/developerworks/community/blogs/pd?lang=en.
But got this error
npm ERR! ibm_db#0.0.18 install: node installer/driverInstall.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ibm_db#0.0.18 install script 'node installer/driverInstall.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the ibm_db package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node installer/driverInstall.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs ibm_db npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls ibm_db npm ERR! There is likely additional logging output above.
I have successfully installed it. Have used nodejs V0.12.7 and npm 3.8.5 and installed it without giving -g i.e. locally now its working fine for me.
i'm trying to install yo angular fullstack, using those versions:
node v5.7.0
npm 3.7.3
yo 1.6.0
bower 1.7.7
I'm getting some npm err
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Sahar\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v5.7.0
npm ERR! npm v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! v8-debug#0.4.6 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the v8-debug#0.4.6 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the v8-debug package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs v8-debug
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls v8-debug
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Sahar\Desktop\Clones\npm-debug.log
This is likely a widows issue. Highly recommended to use node on Linux. Get virtual box and vagrant and spin up Linux virtual machines on a Windows host with a single 'vagrant up' command
I would highly recommend docker too. Get yourself a docker node image inside your VM and you're laughing.
This is the whole attraction of virtual machines, u can just kill them and create another in secs / mins and u avoid all these stupid time wasting setup issues
Hopefully this helps
I am trying to run the scenarios.js Protractor e2e test in the angularjs tutorial, here https://docs.angularjs.org/tutorial. I am following the instructions on the tutorial step two in the blue box.
If I cd into the angular-phonecat directory like they say, I can run npm install, npm run update-webdriver and npm start without errors. I have Version 2.1.0 of protractor installed but when I try to run it I get these errors:
npm ERR! Darwin 14.3.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "protractor"
npm ERR! node v0.12.4
npm ERR! npm v2.11.1
npm ERR! code ELIFECYCLE
npm ERR! angular-phonecat#0.0.0 protractor: `protractor test/protractor-conf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-phonecat#0.0.0 protractor script 'protractor test/protractor-conf.js'.
npm ERR! This is most likely a problem with the angular-phonecat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! protractor test/protractor-conf.js
npm ERR! You can get their info via:
npm ERR! npm owner ls angular-phonecat
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/cohenwan/Sites/angular-phonecat/npm-debug.log
I am not sure if the documentation for the app tutorial is faulty, but I would really like to learn how to end2end test in Protractor, but this isn't helpful. Any recommendations? Or suggestions of better ways to learn Protractor?
I found out I needed to download chrome driver here: http://chromedriver.storage.googleapis.com/index.html?path=2.15/. I downloaded the mac32.zip. And now it is working.