Comments (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.
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.
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.
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.
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)
- TypeScript type FileType HOT 2
- Linebreaks in attribute description breaks code generation
- Provide include/exclude list of solution prefixes, columns
- Opportunity Close metadata import differs from file name only in casing
- Enums should be sorted by integer value to ensure consistency in generation
- Error:Cannot read properties of undefined (reading 'LogicalName')
- Client ID and Secret auth HOT 3
- Duplicate entries Status reason
- Inconsistency in object names HOT 2
- enums for system entity attributes are named incorrectly! HOT 4
- After Ejecting templates and customising, re-running dataverse-gen@v2 didn't pick up the new templates HOT 1
- LookupAttributes are missing from the generated FormContext
- Is there a way to turn off the enum generation ? HOT 1
- Generate WebAPI Types
- Timeout issues HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dataverse-gen.