-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm ERR! notarget No matching version found for @liferay/js-toolkit-core@^5.0.1. #848
Comments
It seems you haven't published version 5.0.1 on npm https://www.npmjs.com/package/@liferay/js-toolkit-core?activeTab=versions |
@0xAnakin I've fixed it. You are too fast π |
Let me know if some other issue arises. Thanks :-) |
@izaera did you upload |
Nope, @liferay/js-toolkit-core has version 5.0.0, but the wrong dependency reference was in portal-base. What package is requesting @liferay/js-toolkit-core 5.0.1 in your case? π€ |
This is the commit -> 380e149 |
I wonder why you are experiencing this error, in any case, because these packages I'm talking about are not related to the generator (the generator is from the JS Toolkit v2, and the new packages are for the next version of JS Toolkit) π€ |
@izaera I'm trying to adapt an existing angular app into liferay so I've installed The wizard prompts me if it should overwrite the {
"name": "angular-app",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"build:liferay": "lnbs-build",
"deploy:liferay": "npm run build:liferay && lnbs-deploy"
},
"private": true,
"dependencies": {
"@angular/animations": "~13.2.0",
"@angular/common": "~13.2.0",
"@angular/compiler": "~13.2.0",
"@angular/core": "~13.2.0",
"@angular/forms": "~13.2.0",
"@angular/platform-browser": "~13.2.0",
"@angular/platform-browser-dynamic": "~13.2.0",
"@angular/router": "~13.2.0",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.2.3",
"@angular/cli": "~13.2.3",
"@angular/compiler-cli": "~13.2.0",
"@types/jasmine": "~3.10.0",
"@types/node": "^12.11.1",
"jasmine-core": "~4.0.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.1.0",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "~4.5.2",
"liferay-npm-build-support": "^2.28.3",
"liferay-npm-bundler": "^2.28.3",
"liferay-npm-bundler-preset-angular-cli": "^2.28.3"
},
"portlet": {
"com.liferay.portlet.display-category": "sample",
"javax.portlet.name": "angularapp",
"javax.portlet.security-role-ref": "power-user,user",
"javax.portlet.resource-bundle": "content.Language",
"com.liferay.portlet.instanceable": false,
"com.liferay.portlet.header-portlet-css": "/angular-app/styles.css"
}
} As you can see the npm installation probably installs the following packages? π€
Before the npm installation completes I get the following error:
Some package requires a version that does not exist on npm. Here is the complete error log. |
Also I've uninstalled |
OK, so the problem must be in one of those deps. Let me check. |
I've copied your package.json and run Have you tried to delete the node_modules folder of your project and the package-lock.json file? Some of those must be holding a bogus reference... |
This is what I get putting your package.json in an empty directory: ivan@baco:~/Temporal/LL $ yarn
yarn install v1.22.17
info No lockfile found.
[1/4] Resolving packages...
warning @angular-devkit/build-angular > stylus > css > [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
warning liferay-npm-build-support > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning liferay-npm-build-support > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning liferay-npm-build-support > request > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
warning liferay-npm-build-support > babel-template > babel-runtime > [email protected]: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
warning liferay-npm-build-support > request > [email protected]: this library is no longer supported
warning liferay-npm-bundler > babel-core > babel-register > [email protected]: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 43.44s.
ivan@baco:~/Temporal/LL $ yarn why @liferay/js-toolkit-core
yarn why v1.22.17
[1/4] Why do we have the module "@liferay/js-toolkit-core"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "@liferay/[email protected]"
info Reasons this module exists
- "liferay-npm-bundler-preset-angular-cli#@liferay#portal-adapt-base#@liferay#portal-base" depends on it
- Hoisted from "liferay-npm-bundler-preset-angular-cli#@liferay#portal-adapt-base#@liferay#portal-base#@liferay#js-toolkit-core"
info Disk size without dependencies: "9.28MB"
info Disk size with unique dependencies: "19.74MB"
info Disk size with transitive dependencies: "9.28MB"
info Number of shared dependencies: 120
Done in 0.50s. |
Steps to reproduce the issue:
Also if you delete |
I'm getting a similar error, but not for the same dep π : ivan@baco:~/Temporal/issue-850/angular-app (master) $ npx yo liferay-js:adapt
π Welcome to Liferay JS Toolkit project adapter
βοΈ We have detected a project of type angular-cli
It will be tuned accordingly, so that you can deploy it to your Liferay
server.
But first we need you to answer some customization questions...
? Under which category should your widget be listed? category.sample
? Do you have a local installation of Liferay for development? Yes
? Where is your local installation of Liferay placed? /opt/liferay
β οΈ Now your project files will be modified. As a consequence, Yeoman may
notify you about the existence of a conflict and prompt for permission
to overwrite your files.
Make sure to answer 'a' or otherwise the adaptation to Liferay JS
Toolkit will fail.
βΉοΈ Note that you can also avoid this conflict warning providing the
'--force' argument to Yeoman.
conflict package.json
? Overwrite package.json? overwrite this and all others
force package.json
create .npmbuildrc
create .npmbundlerrc
create features/localization/Language.properties
force .gitignore
βοΈ Your project has been successfully adapted to Liferay JS Toolkit.
βΉοΈ See http://bit.ly/js-toolkit-adapt for the full list of npm scripts
that may be used in your newly adapted project.
Nevertheless, you can start with 'npm run deploy:liferay' to deploy it
to your Liferay server.
I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.
npm ERR! code ETARGET
npm ERR! notarget No matching version found for webpack-cli@^4.9.1.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ivan/.npm/_logs/2022-02-11T07_29_41_518Z-debug-0.log |
If I Then, I've been able to find out what uses $ npm ls @liferay/js-toolkit-core
[email protected] /home/ivan/Temporal/issue-850/angular-app
βββ¬ [email protected]
βββ¬ @liferay/[email protected]
βββ¬ @liferay/[email protected]
βββ @liferay/[email protected] |
We have the "old" code from JS Toolkit v2 pointing to the "new" code in I'm going to unpublish the incorrect Have you tried cleaning the npm cache? Or maybe look for files like Another test you can do is what I did. Let it fail, then cd to angular-app and run npm install again, then the npm ls to see the dependency path. The difference between npm and yarn may also be due to npm caching different things than yarn (as each tool uses its own cache). |
Also, regarding the error I got (with |
For the record: I've deprecated $ npm deprecate -f @liferay/[email protected] "This package version (1.1.0) contains an invalid version for dependency @liferay/js-toolkit-core: expect it to fail. Use version 1.1.1 instead." |
I'll wait for the tests suggested here π #848 (comment) to take place before closing this issue. |
@0xAnakin If you will be doing this π #850 (comment) and it works, just forget about my suggestions and close this issue π |
Yeap the new tool seems to work better, has some minor issues still tho, see #850 for more. I'm closing this one |
I was trying to adapt a newly created angular(v13) app.
After entering
yo liferay-js:adapt
the process started and while the npm install was running I got the following dependency error:node version:
16.14.0
packages installed globally:
βββ @angular/[email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
βββ [email protected]
The text was updated successfully, but these errors were encountered: