0
votes

When I use git command line to push to Azure I keep on getting this error message (this is the first line of maybe 20 in the message dump, full message below).

remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(326): error C2995: 'v8::Local Nan::imp::NanEnsureHandleOrPersistent(const v8::Local &)': function template has already been defined [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj]

I had an issue with async that I fixed by just using ftp to copy the node_modules\async folder from my development environment up to the node_modules folder in Azure. Credit for that idea came from this article:

https://azure.microsoft.com/en-us/documentation/articles/nodejs-use-node-modules-azure-apps/

So here's the strange thing - I don't have node-icu-charset in my package.json and it doesn't exist in the node_modules folder either (either local or Azure) so I can't just copy this package up to the cloud to fix this issue like I did with async.

I'm developing on Windows 10 with VS Code, local node.js version is 6.1.0 and server node.js version is 6.1.0. npm on Azure is 3.8.6.

Everything is working fine locally in my development environment and even though this error has been there in pretty much every push I've made the Azure site is also working as expected.

Does anyone know how to get rid of this error?


  "dependencies": {
    "async": "~2.0.0-rc.6",
    "config": "~1.21.0",
    "body-parser": "~1.13.2",
    "cookie-parser": "~1.3.5",
    "auth0": "~2.1.0",
    "express-jwt": "~3.4.0",
    "debug": "~2.2.0",
    "express": "~4.13.1",
    "jade": "~1.11.0",
    "morgan": "~1.6.1",
    "serve-favicon": "~2.3.0",
    "documentdb": "~1.7.0",
    "node-cache": "~3.2.1",
    "winston": "~2.2.0",
    "winston-irc": "~0.3.4"
  }

remote: Updating branch 'master'. remote: Updating submodules. remote: Preparing deployment for commit id 'b11dba66e0'. remote: Generating deployment script. remote: Running deployment command... remote: Handling node.js deployment. remote: KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot' remote: Copying file: 'package.json' remote: Copying file: 'config\default.json' remote: Copying file: 'node_modules\async\LICENSE' remote: Copying file: 'node_modules\async\package.json' remote: Copying file: 'node_modules\async\README.md' remote: Using start-up script bin/www from package.json. remote: Generated web.config. remote: Node.js versions available on the platform are: 0.6.20, 0.8.2, 0.8.19, 0.8.26, 0.8.27, 0.8.28, 0.10.5, 0.10.18, 0.10.21, 0.10.24, 0.10.26, 0.10.28, 0.10.29, 0.10.31, 0.10.32, 0.10.40, 0.12.0, 0.12.2, 0.12.3, 0.12.6, 4.0.0, 4.1.0, 4.1.2, 4.2.1, 4.2.2, 4.2.3, 4.2.4, 4.3.0, 4.3.2, 4.4.0, 4.4.1, 5.0.0, 5.1.1, 5.3.0, 5.4.0, 5.5.0, 5.6.0, 5.7.0, 5.7.1, 5.8.0, 5.9.1, 6.0.0, 6.1.0. remote: Selected node.js version 6.1.0. Use package.json file to choose a different version. remote: Selected npm version 3.8.6 remote: Updating iisnode.yml at D:\home\site\wwwroot\bin\iisnode.yml remote: ........... remote: remote: > [email protected] install D:\home\site\wwwroot\node_modules\node-icu-charset-detector remote: > node-gyp rebuild remote: remote: remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\npm\3.8.6\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) remote: ....... remote: Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. remote: node-icu-charset-detector.cpp remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(326): error C2995: 'v8::Local Nan::imp::NanEnsureHandleOrPersistent(const v8::Local &)': function template has already been defined [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote:
D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(319): note: see declaration of 'Nan::imp::NanEnsureHandleOrPersistent' remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(346): error C2995: 'v8::Local Nan::imp::NanEnsureLocal(const v8::Local &)': function template has already been defined [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote:
D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(334): note: see declaration of 'Nan::imp::NanEnsureLocal' remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(560): error C2039: 'GCEpilogueCallback': is not a member of 'v8::Isolate' [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote:
d:\local\userprofile.node-gyp\6.1.0\include\node\v8.h(5306): note: see declaration of 'v8::Isolate' remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(560): error C2065: 'GCEpilogueCallback': undeclared identifier [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(561): error C2146: syntax error: missing ')' before identifier 'callback' [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(561): error C2143: syntax error: missing ';' before '{' [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(561): error C2447: '{': missing function header (old-style formal list?) [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(566): error C2039: 'GCEpilogueCallback': is not a member of 'v8::Isolate' [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote:
d:\local\userprofile.node-gyp\6.1.0\include\node\v8.h(5306): note: see declaration of 'v8::Isolate' remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(566): error C2065: 'GCEpilogueCallback': undeclared identifier [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(566): error C2146: syntax error: missing ')' before identifier 'callback' [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(566): error C2143: syntax error: missing ';' before '{' [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(566): error C2447: '{': missing function header (old-style formal list?) [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(571): error C2039: 'GCPrologueCallback': is not a member of 'v8::Isolate' [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote:
d:\local\userprofile.node-gyp\6.1.0\include\node\v8.h(5306): note: see declaration of 'v8::Isolate' remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(571): error C2065: 'GCPrologueCallback': undeclared identifier [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(572): error C2146: syntax error: missing ')' before identifier 'callback' [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(572): error C2143: syntax error: missing ';' before '{' [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(572): error C2447: '{': missing function header (old-style formal list?) [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(577): error C2039: 'GCPrologueCallback': is not a member of 'v8::Isolate' [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote:
d:\local\userprofile.node-gyp\6.1.0\include\node\v8.h(5306): note: see declaration of 'v8::Isolate' remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(577): error C2065: 'GCPrologueCallback': undeclared identifier [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(577): error C2146: syntax error: missing ')' before identifier 'callback' [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(577): error C2143: syntax error: missing ';' before '{' [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(577): error C2447: '{': missing function header (old-style formal list?) [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(757): error C3083: 'smalloc': the symbol to the left of a '::' must be a type [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(757): error C2039: 'FreeCallback': is not a member of 'node' [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote:
D:\local\UserProfile.node-gyp\6.1.0\include\node\node_object_wrap.h(8): note: see declaration of 'node' remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(757): error C2061: syntax error: identifier 'FreeCallback' [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(761): error C2065: 'callback': undeclared identifier [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(761): error C2065: 'hint': undeclared identifier [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(768): error C2665: 'node::Buffer::New': none of the 4 overloads could convert all the argument types [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote:
D:\local\UserProfile.node-gyp\6.1.0\include\node\node_buffer.h(46): note: could be 'v8::MaybeLocal node::Buffer::New(v8::Isolate *,char *,size_t)' remote:
D:\local\UserProfile.node-gyp\6.1.0\include\node\node_buffer.h(34): note: or 'v8::MaybeLocal node::Buffer::New(v8::Isolate *,v8::Local,node::encoding)' remote:
D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(768): note: while trying to match the argument list '(v8::Isolate *, const char *, uint32_t)' remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(772): error C2440: 'return': cannot convert from 'v8::MaybeLocal' to 'v8::Local' [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote:
D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(772): note: No constructor could take the source type, or constructor overload resolution was ambiguous remote: gyp ERR! build error remote: gyp ERR! stack Error: msbuild failed with exit code: 1 remote: gyp ERR! stack at ChildProcess.onExit (C:\Program Files (x86)\npm\3.8.6\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23) remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(779): error C2039: 'Use': is not a member of 'node::Buffer' [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: gyp ERR! stack at emitTwo (events.js:106:13) remote:
D:\local\UserProfile.node-gyp\6.1.0\include\node\node_buffer.h(11): note: see declaration of 'node::Buffer' remote: gyp ERR! stack at ChildProcess.emit (events.js:191:7) remote: D:\home\site\wwwroot\node_modules\node-icu-charset-detector\node_modules\nan\nan.h(779): error C3861: 'Use': identifier not found [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12) remote: ..\node-icu-charset-detector.cpp(7): fatal error C1083: Cannot open include file: 'unicode/ucsdet.h': No such file or directory [D:\home\site\wwwroot\node_modules\node-icu-charset-detector\build\node-icu-charset-detector.vcxproj] remote: gyp ERR! System Windows_NT 6.2.9200 remote: gyp ERR! command "D:\Program Files (x86)\nodejs\6.1.0\node.exe" "C:\Program Files (x86)\npm\3.8.6\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" remote: gyp ERR! cwd D:\home\site\wwwroot\node_modules\node-icu-charset-detector remote: gyp ERR! node -v v6.1.0 remote: gyp ERR! node-gyp -v v3.3.1 remote: gyp ERR! not ok remote: npm WARN install:[email protected] [email protected] install: node-gyp rebuild remote: npm WARN install:[email protected] Exit status 1 remote: Finished successfully. remote: Running post deployment command(s)... remote: Deployment successful.

1
Could you please provide your all dependencies in package.json?Gary Liu
Added dependencies, thank you.Graham

1 Answers

1
votes

As checked these dependencies one by one, I found that the module winston-irc is the criminal, whose deep dependencies including chain is winston-irc=>irc=>node-irc=>node-icu-charset-detector.

So this maybe the one of Native Modules which is not supported via directly deployment task yet. You can remove this node module from .gitingore file and uploud to Azure Web App with the application project.

Any further concern, please feel free to let me know.