I moved to a new computer and need to revive old projects (mostly vue, quasar). To do so I run yarn install, then yarn global add #quasar/cli. After the second command I get an error:
error create-strapi-app#4.0.6: The engine "node" is incompatible with this module. Expected version ">=12.22.0 <=16.x.x". Got "18.12.0"
error Found incompatible module.
I did install the strapi cli in a previous project, but I thought that I removed it again using yarn global remove strapi:
> yarn global remove strapi
error This module isn't specified in a package.json file.
So I wonder where the error comes from. I checked the global dir (yarn global dir), but there is no strapi cli neither any strapi package at all.
How can I remove the create-strapi-app error?
(I do not want to change the node version; I want to remove the error.)
Related
Hell guys,
I am trying to install Strapi for my backend, but getting this error:
error strapi-generate-new#3.5.4: The engine "node" is incompatible with this module. Expected version ">=10.16.0 <=14.x.x". Got "15.9.0"
error Found incompatible module.
Any pointers how to fix this issue?
Strapi won't run on NodeJS odd numbered versions - which are for developers. You are probably using the 15.14.0, so you have to change to the latest LTS (14.16.1).
To change it, you should use nvm (or node version manager). You can change temporarily with nvm use 14.16.1 or for good (which I recommend) with nvm alias default 14.16.1
I have uninstalled everything
I have uninstalled chocolatey, node, npm, and yarn in windows
I have deleted the cache folder. But it still gives the same error.
WHERE ARE REST OF THE GLOBAL INSTALLED FOLDERS?
I still have lots of old globally installed packages.
Check out Striped version of error...
yarn global list
yarn global v1.22.0
warning Pattern ["colors#latest"] is trying to unpack in the same destination "C:\\Users\\myUser\\AppData\\Local\\Yarn\\Cache\\v6\\npm-colors-1.4.0-c50491479d4c1bdaed2c9ced32cf7c7dc2360f78-integrity\\node_modules\\colors" as pattern ["colors#^1.1.2","colors#^1.1.2","colors#^1.1.2"]. This could result in non-deterministic behavior, skipping.
warning url-loader#1.1.2: Invalid bin field for "url-loader".
info "#vue/cli#4.2.2" has binaries:
- vue
Do you have some recommendations?
Use yarn global dir to discover the location.
Global installed files are under C:\Users\myUser\AppData\Local\Yarn\Data\global
Check docs for a more detailed answer.
I am using a template, Vue cli3 application and it stopped working and I don't recall why. The error I am receiving is when I try to start the application I get this error.
yarn run serve
yarn run v1.16.0
error An unexpected error occurred: "The \"path\" argument must be of type string. Received type object".
info If you think this is a bug, please open a bug report with the information provided in "C:\\node\\TradeTriggers\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I can delete the node_modules and package.json.lock
I cannot do anything with yarn. No yarn install, yarn run serve, nothing and npm doesn't seem to want to run the application. I'm sorry there are a lot of tools to know in the JS world!
The machine is a windows10 machine and I cannot find yarn in my env variables, so the issue may lie there. I even tried installing the Yarn MSI but my version is still the one I installed through npm a while ago, still nothing.
I had problem that was caused by yarn looking at first the global settings file, ie global registry. It might be similar. On Windows, first check your yarn config path:
yarn config bin
Windows shows the path. Then in that folder, check whether you have a "rc" file, ie that is yarn configuration.
Try move this file out of the folder, for test. Have it as a copy somewhere else, where you can restore it if this does not help.
Then, once file is out, run your yarn commands again like you used to.
Sideline: on Linux, I had to remove a leftover buggy .yarnrc file in
/usr/local/share/.yarnrc
to get similar things working again. It was not a Vue app, but similar kind of error.
This error can occur when you are using Yarn Workspaces and have incompatible directories in the packages/ directory.
In my scenario, I used git subtrees to pull another repo into my project's packages/ directory. This directory had a package.json file, but it did not have compatible values for the fields required by Yarn Workspaces.
Moving the problematic package out of packages/ should fix this issue.
I'm using serverless to create a Lambda (Node 10x).
The Lambda uses Rollup to create JS and CSS assets. But it is failing at the Rollup stage.
It runs locally using Node 10.0.0 and serverless-offline but once it gets to production, I get this error
2019-08-29T14:32:35.254Z ERROR error: { Error: Missing binding /var/task/node_modules/node-sass/vendor/linux-x64-64/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 10.x
Found bindings for the following environments:
- OS X 64-bit with Node.js 10.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.
at error (/var/task/node_modules/rollup/dist/rollup.js:224:15)
at /var/task/node_modules/rollup/dist/rollup.js:17213:17
code: 'PLUGIN_ERROR',
plugin: 'postcss',
id: '/var/task/src/css/app.scss' }
I can run npm rebuild node-sass locally and it does something to my node_modules and makes it bigger, too big in fact to deploy to AWS!
So before I go and rip things out of the app to try and get it to compile at a smaller size, is there anything else I can do regarding this node-sass environment issue?
Thanks
Solved it!
In node_modules/node-sass/vendor/ there was only a darwin-x64-64/binding.node folder/file.
From this github page I downloaded linux-x64-64__binding.node
renamed it to binding.node and created a linux-x64-64 folder and put it in there: node_modules/node-sass/vendor/linux-x64-64/binding.node
Then redeployed the lambda and all is well. I just need to remember to do that if/when I do a yarn update or similar.
I have a global bs-platform installation and a local one for a local project. They are in different versions. Everything was fine until today. Every time I try to run my local project, the following error is thrown:
bs-platform version mismatch Running bsb 5.0.4 (/home/jefferson/.nvm/versions/node/v12.4.0/lib/node_modules/bs-platform) vs vendored 4.0.5 (/home/jefferson/astrocoders/lion-carne-client/node_modules/bs-platform)
How can this be solved? I'm using yarn.
You have a few options:
Use the locally installed package
a. Through a script defined in package.json, executed using yarn run or npm run
b. Through executing the command via npx, which comes with npm: npx bsb -make-world
Use the globally installed package by linking it into the project and overwriting any locally installed package of the same name, using either yarn link bs-platform or npm link bs-platform (only needed once per project). node_modules/bs-platform will then be a symlink that points to the globally installed package, hence no version mismatch when running the global bsb.