i've a repo with multiple react projects arranged in different subfolders
is it possible to open a specific project usign the link button?
somethig like this:
//pseudocode - this is the pat of my repo
https://gitpod.io/#https://github.com/pinale/?task=refinefirebase
this is my .gitpod.yml file:
tasks:
- name: reactstun
before: cd reactstun
init: npm install
command: npm run start
- name: refinefirebase
before: cd refinefirebase
init: npm install
command: npm run dev
- name: refineheadlessapp
before: cd refineheadlessapp
init: npm install
command: npm run dev
- name: refinemuiapp
before: cd refinemuiapp
init: npm install
command: npm run dev
Related
I have read through many stack overflow questions and official documentation from Circleci but for some reason it will not let me publish packages via ci/cd.
No matter what I do I consistently get the following
error message
I have reset the NPM_TOKEN and know that it is correct and I don't see the issue with my code. according to the docs it should work but it does not. Am I missing something obvious?
Here is what I have tried
jobs:
publish:
executor: node
steps:
- checkout
- install
- run:
name: Build package
command: yarn build // tsc builds package to the lib directory
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- run:
name: Publish library
command: npm publish lib
also
jobs:
publish:
executor: node
steps:
- checkout
- install
- run:
name: Build package
command: yarn build // tsc builds package to the lib directory
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/project/.npmrc
- run:
name: Publish library
command: npm publish lib
and
jobs:
publish:
executor: node
steps:
- checkout
- install
- run:
name: Build package
command: yarn build
- run:
name: Publish library
command: |
npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN
npm publish lib
and a few other variations but they were more tinkering, the above are examples that I have seen as documentation
I've created a public npm repository: https://www.npmjs.com/package/point-cloud-visualiser
I'm trying to run npm publish from within codebuild. I have generated a token and saved it in AWS secrets manager. I am succesfully pulling the secret in the buildspec. However I am unsure how to configure the .npmrc file so that it uses the token and doesn't tell me to login.
Currently my .npmrc looks like this:
#point-cloud-visualiser:registry=https://www.npmjs.com/package/point-cloud-visualiser
//point-cloud-visualiser/:_authToken=${NPM_TOKEN}
And my buildspec.yml looks like this:
version: 0.2
env:
secrets-manager:
NPM_TOKEN: "npm-token:npm-token"
phases:
install:
commands:
- npm install
build:
commands:
- npm run build
- npm publish
But when it fails on npm publish giving the error:
npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in to https://registry.npmjs.org/
npm ERR! need auth You need to authorize this machine using `npm adduser`
I have also tried removing the .npmrc file and using the following in the buildspec.yml:
version: 0.2
env:
secrets-manager:
NPM_TOKEN: "npm-token:npm-token"
phases:
install:
commands:
- npm install
build:
commands:
- npm run build
- npm config set registry 'https://www.npmjs.com/package/point-cloud-visualiser'
- npm config set '//npmjs.com/package/point-cloud-visualiser/:always-auth' 'true'
- npm config set '//npmjs.com/package/point-cloud-visualiser/:_authToken' '${NPM_TOKEN}'
- npm publish
But this approach gives the same result as above. What am I doing wrong? Thank you!
The following buildspec worked succesfully:
version: 0.2
env:
secrets-manager:
NPM_TOKEN: "npm-token:npm-token"
phases:
install:
commands:
- npm install
build:
commands:
- npm run build
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- echo "//registry.npmjs.org/:always-auth=true" >> ~/.npmrc
- npm publish
this is my buildspec file:
version: 0.2
env:
git-credential-helper: yes
phases:
install:
runtime-versions:
nodejs: 10
commands:
- npm install
build:
commands:
- npm run build
post_build:
commands:
- echo Build completed on `date`
and in package.json I added:-
dependencies : {
"sharedLib":"git+https://git-codecommit.us-east-1.amazonaws.com/v1/repos/sharedLib#branchname"
}
I am getting build error in npm install. Any help will be appritiated.
Through IAM services give a Code commit access to the Role which is assigned to code build.
Then Code build should Run.
New to Sapper, the SSR version of Svelte.
I try to get the tests from the basic template to run in Gitlab.
My test job in the .gitlab-ci.yml looks like this:
test-job:
stage: test
image: cypress/base:10
script:
- npm install --save-dev cypress
- npm i serve
- serve -s build -l 3000 & yarn wait-on http://localhost:3000
- $(npm bin)/cypress verify
- $(npm bin)/cypress run
When I tried - npm run cypress run after - npm install it could not find the server. Then i tried to install serve but I still get an error:
$ serve -s build -l 3000 & yarn wait-on http://localhost:3000
/bin/bash: line 96: serve: command not found
Thanks for any pointers.
I need to install a module "express" from npm via salt-stack.
For this, I used the following script:
npm-installed:
pkg.installed:
- name: npm
npm-express-installed:
npm.installed:
- user: root
- pkgs: "express"
- dir: /opt/MyService
- require:
- pkg: npm
The installation ran successfully but on my destination I can only see
/opt/MyService/node_modules# ls
e p r s x
Is someone else here who installed npm packages via salt-stack? How do I solve this issue?
This is the solution:
npm-installed:
pkg.installed:
- name: npm
npm-packages-installed:
npm.installed:
- names:
- express
- body-parser
- user: root
- dir: /opt/MyService
- require:
- pkg: npm