The target "/t:native_metrics" does not exist in the project - javascript

i want to install newrelic on my project but i'm receiving from de console:
node_modules\#newrelic\native-metrics\build\bind ing.sln.metaproj : error MSB4057: The target "/t:native_metrics" does not exist in the project.
in another machine works perfectly. i really would appreciate if some one could help with that, i already tried this from newrelic https://discuss.newrelic.com/t/newrelic-native-metrics-does-not-install-on-windows-10-from-corrupt-vcxproj/54625/3

This is most likely due to the version of node-gyp. A change was introduced into node-gyp
version 3.7.0 that prepends /t: to the build target on Windows machines. The ./lib/pre-build.js file that New Relic uses to bootstrap the build also prepends /t: to the target which results in a value of /t:/t:native_metrics being passed to MSBuild, which isn't valid. You can fix this by installing an older version of node-gyp. Depending on how npm is set up on your machine you may also have to set the npm_config_node_gyp environment variable to the path of the older version of node-gyp so it gets picked up by the New Relic bootstrapper.

Related

CKEditorError: ckeditor-duplicated-modules

I'm customizing ckeditor5, It can build successfully but when implemented it has an error saying "CKEditorError: ckeditor-duplicated-modules". I'm not sure what module duplicated.
In my code imported
Try to install the same version plugins (it work for me) likes:
check ckeditor5-core version fisrt
#ckeditor/ckeditor5-core": "^33.0.0"
I want to add "table" tool, use
npm i #ckeditor/ckeditor5-table#33.0.0"
to get specified version, instead of
npm i #ckeditor/ckeditor5-table
you may get a newer version, which need the second ckeditor5-core package lead to duplicated-modules (now you know which module duplicated)

Auto-update path to node-gyp include files in a Visual Studio C++ project

I'm trying to convert a project that compiles just fine on MacOS and Linux (Raspbian in particular) so that it will compile on Windows. (Full code here: https://github.com/kshetline/rpi-acu-rite-temperature)
After much grief (Like somehow the Node 12 I'd installed going away and getting replaced by Node 8 without my knowledge, and on Windows C++ long and int are both 32-bit? Really!?) I've finally made the code to compile using both node-gyp and Visual Studio 2019, but the Visual Studio set-up is fixed to a specific version of Node in a way that I don't like.
Here's my CppProperties.json file:
{
"configurations": [
{
"inheritEnvironments": [
"msvc_x86"
],
"name": "x86-Debug",
"includePath": [
"${env.INCLUDE}",
"${env.LOCALAPPDATA}\\node-gyp\\Cache\\12.16.1\\include\\node\\**",
"${workspaceRoot}\\**"
],
"defines": [
"WIN32",
"_DEBUG",
"NAPI_CPP_EXCEPTIONS",
"UNICODE",
"_UNICODE",
"USE_FAKE_PIGPIO"
],
"intelliSenseMode": "windows-msvc-x86"
}
]
}
I don't want to have to put a specific version of Node in my include path, but I don't know how to make this work without it. I can't even make it work for a specific major version of Node by using 12.* or 12.** -- wildcards don't seem to work for me there.
I see no Windows environment variable that would let me use something like, say, ${env.NODE_VERSION}, and AFAIK there's no VS pre-defined variable that would handle this either.
I could use my own environment variable, but that would have to be manually updated, which is what I'm trying to avoid.
Does Visual Studio have a way that I could script an update, like somehow doing the command node --version, stripping off the leading letter 'v' from the output, and then putting the result into an environment variable?
Any other possible solutions?
Update:
I changed the set-up of my Visual Studio project by starting with a generic command-line app, and the configuration works totally differently, with no CppProperties.json file at all, but the issue is still basically the same -- I now have $(LOCALAPPDATA)\node-gyp\Cache\12.16.1\include\node entered into a config dialog instead.
An addon using node-addon-api must, at compile time, target a precise version of node.
That's because N-API is itself "versioned", (with a single digit macro, NAPI_VERSION, currently from 1 to 5, plus the special value NAPI_VERSION_EXPERIMENTAL=2147483647)
As you can see, for example, in the N-API Version Matrix the version 4 is available in node v10.16.0 but NOT in some older v10 releases.
The addon is "retro-linked" (I don't know the name of that technique) to node.exe, and that link is a "delay load" one. That trick allows the addon to use the N-APIfunctions that are in the host executable, even if it's not "node.exe" (hence the use of win_delay_load_hook.cc).
As for CppProperties.json file, it is my understanding that it's only used by Intellisence and is not related to headers used at compile time.
You can force node-gyp to use a specific version of node, unrelated to the current version installed on the machine, with the --target option to the configure command.
Another useful option is --devdir, which allows to get rid of the infamous (afaic) %localappdata%\node-gyp\Cache root directory.
All the node-gyp command options are here
Please, dear node/node_gyp/N-API experts reading this, don't hesitate to signal/fix errors in that answer.

Sails.js doesn't work, 'sails' is not recognized

'sails' is not recognized as an internal or external command,
operable program or batch file.
So basically I use Windows 10 and I need Sails up and running. I saw on YT people working with that with no problems. I really wanna use Sails.js because it's amazing but I cannot use it.
I don't know what's wrong. I'm doing everything like they say to do. I've installed it globally through npm and of course, I have Node installed and still, I have that error...
What should I do?
It looks like you are missing the path to the sails script in the PATH environment variable. What you can do is find where your sails have been installed:
dir sails.cmd /s
After you find it, open windows menu and type directly 'env' and then select 'Edit the system environment variables'. In the opened window click on the 'Environment variables...' button and add the path to the 'Path' variable.
However, a more preferable way is to uninstall everything (node included) and use the nvm (Node Version Manager) program to get the node itself. You can find it here:
https://github.com/coreybutler/nvm-windows/releases
Then use it to get the node version you want. It is a very useful tool to quickly change between node versions. After that install sails as usual and you should be good to go.

Switch version of Node.js to 6.11.5 on Windows

I'm using node v8.2.1, but Google Cloud Functions only supports v6.11.5, so I'm looking to switch my node version accordingly (preferably only using npm). How can I do this?
How to change to an older version of node.js, the most relevant source I found, has dated answers for Windows. Using nvmw doesn't work for me, I get:
$- nvmw install 6.11.5
ERROR: The system was unable to find the specified registry key or value.
I also recommend you to try nvm-windows. It will let you install multiple node versions and allow to switch between them. But you need to remove all your previous node installations and related directories first. Depends on your machine, in Windows 10 sometimes got some issues (I was having some problems also when first time install it on my Windows 10) but somehow able to fix it and it's worked for me.
I'm not sure are you asking to change nodejs version for Windows or Google cloud
For Windows I'll highly recommend NVM for Windows, but you'll need to try it yourself, I don't know is it because my customize setting on my PC or what it doesn't success on my side

Cannot run Meteor js 1.1 on windows 8.1

I have tried to install meteor js 1.1 on windows 8.1 with the official installer:
https://github.com/meteor/meteor/wiki/Preview-of-Meteor-on-Windows
But even after restarting my computer, when I type the command meteor in the command prompt I get the error command not found.
Even after a search on my computer to find the installation folder of meteor, I am unable to find the answer. However, in the add/remove program utility, I can see meteor.exe.
As a note, I already successfully installed meteor before, and it used to run smoothly. In the meantime, I have removed and re-installed node, and it seems that since this moment the command meteor does not work anymore. Hence my attempt to re-install it.
Does anyone have any idea about how to troubleshoot my issue ?
I just solved my issue by using the windows command prompt instead of the git bash
It appears that only windows command prompt is supported so far.
You can try to manually add Meteor to your Path.
Go to "Environment variables" (you can find it by doing a simple search in your welcome screen) and add the following entry:
C:\\Users\\**your_user_name**\\AppData\\Local\\.meteor
Do not forget to separate this entry from other entries by a semicolon ;.

Categories

Resources