GithubHelp home page GithubHelp logo

Comments (5)

humanoidcreature avatar humanoidcreature commented on June 7, 2024 5

Had the same issue when followed the dataverse-ify's QuickStart wiki page.
It installed the 1.x version of everything. But to fix it, you just have to edit your package.json and add the 2.x version.
"dependencies": { "dataverse-gen": "^2.0.15", "dataverse-ify": "^2.0.7", "dataverse-auth": "^2.0.7" }
Then just run npm install and do the authentiacation and dataverse-gen init again.

from dataverse-gen.

scottdurow avatar scottdurow commented on June 7, 2024

Hi @albercl - This is probably down to you having both version 1 and version 2 installed.

Can you use:
npm uninstall -g dataverse-auth
npm uninstall -g dataverse-ify
npm uninstall -g dataverse-gen

Then try again? What version does it prompt you to install?

from dataverse-gen.

albercl avatar albercl commented on June 7, 2024

When I installed the packages I just ran npm dataverse-ify and npm dataverse-gen so it's supposed to download the latests versions. This versions are:

  • dataverse-ify: 1.0.13
  • dataverse-gen: 1.0.16
  • dataverse-auth: 1.0.9

I tryed installing dataverse-auth using npm install dataverse-auth but is the same version that is included with dataverse-gen.

My situation right now is that I tryed installing dataverse-ify and dataverse-gen in a new project (I don't have them installed globally) and the error still appears. I detected that the error appears because it tries to import the token cache from dataverse-ify/lib/xrm-webapi/TokenCache while the real import path is dataverse-ify/lib/webapi/TokenCache. I also tried to change the import path of the dataverse-gen package to the correct one and then it works fine. Maybe the releases publised to npm aren't updated or aligned?

The specific line is index.ts#9 that is import { loadTokenCache } from "dataverse-ify/lib/xrm-webapi/TokenCache"; but should be import { loadTokenCache } from "dataverse-ify/lib/webapi/TokenCache";. At least, I changed it on the compiled JS and it worked as expected.

from dataverse-gen.

khoait avatar khoait commented on June 7, 2024

I'm using the same versions and having the same error as @albercl .

I notice latest versions on npm are 1.x not 2.x. Is it correct @scottdurow ?

from dataverse-gen.

janis-veinbergs avatar janis-veinbergs commented on June 7, 2024

Wanted to test out dataverse-ify and npm is broken for me too.
Tried to remove globals, noticed still using something from %appdata%\npm-cache deleted that, installed only locally, etc, etc, but always not working.

So the way I did get it to work is something like this (writing on top of my head):

mkdir dataverseify-test
cd dataverseify-test
mkdir libs
cd libs
git clone https://github.com/scottdurow/dataverse-auth.git
git clone https://github.com/scottdurow/dataverse-ify.git
git clone https://github.com/scottdurow/dataverse-gen.git
cd ..
# Will error out if no such dir created before generating types
mkdir -p src\dataverse-gen
npm init

Add workspaces to package.json:

"workspaces": [
    "libs/*"
  ],
npm install --save .\libs\dataverse-ify\
npm install --save-dev .\libs\dataverse-gen\
npm install --save-dev .\libs\dataverse-auth\

And then thiss stuff works and is on latest version:

npx dataverse-auth
npx dataverse-gen init

So what this does is creates a monorepo where those 3 libs are coming not from node modules, but from packages within libs directory

from dataverse-gen.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.