jeudi 23 juin 2016

node-icu-charset-detector error when deploying to node on Azure

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:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(326): error C2995: 'v8::Local Nan::imp::NanEnsureHandleOrPersistent(const v8::Local &)': function template has already been defined [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj]

I had an issue with async that I fixed by just using ftp to copy the node_modulesasync 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:homesiterepository' to: 'D:homesitewwwroot' remote: Copying file: 'package.json' remote: Copying file: 'configdefault.json' remote: Copying file: 'node_modulesasyncLICENSE' remote: Copying file: 'node_modulesasyncpackage.json' remote: Copying file: 'node_modulesasyncREADME.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:homesitewwwrootbiniisnode.yml remote: ........... remote: remote: > node-icu-charset-detector@0.1.0 install D:homesitewwwrootnode_modulesnode-icu-charset-detector remote: > node-gyp rebuild remote: remote: remote: D:homesitewwwrootnode_modulesnode-icu-charset-detector>if not defined npm_config_node_gyp (node "C:Program Files (x86)npm3.8.6node_modulesnpmbinnode-gyp-bin....node_modulesnode-gypbinnode-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:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(326): error C2995: 'v8::Local Nan::imp::NanEnsureHandleOrPersistent(const v8::Local &)': function template has already been defined [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote:
D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(319): note: see declaration of 'Nan::imp::NanEnsureHandleOrPersistent' remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(346): error C2995: 'v8::Local Nan::imp::NanEnsureLocal(const v8::Local &)': function template has already been defined [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote:
D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(334): note: see declaration of 'Nan::imp::NanEnsureLocal' remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(560): error C2039: 'GCEpilogueCallback': is not a member of 'v8::Isolate' [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote:
d:localuserprofile.node-gyp6.1.0includenodev8.h(5306): note: see declaration of 'v8::Isolate' remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(560): error C2065: 'GCEpilogueCallback': undeclared identifier [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(561): error C2146: syntax error: missing ')' before identifier 'callback' [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(561): error C2143: syntax error: missing ';' before '{' [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(561): error C2447: '{': missing function header (old-style formal list?) [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(566): error C2039: 'GCEpilogueCallback': is not a member of 'v8::Isolate' [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote:
d:localuserprofile.node-gyp6.1.0includenodev8.h(5306): note: see declaration of 'v8::Isolate' remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(566): error C2065: 'GCEpilogueCallback': undeclared identifier [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(566): error C2146: syntax error: missing ')' before identifier 'callback' [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(566): error C2143: syntax error: missing ';' before '{' [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(566): error C2447: '{': missing function header (old-style formal list?) [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(571): error C2039: 'GCPrologueCallback': is not a member of 'v8::Isolate' [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote:
d:localuserprofile.node-gyp6.1.0includenodev8.h(5306): note: see declaration of 'v8::Isolate' remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(571): error C2065: 'GCPrologueCallback': undeclared identifier [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(572): error C2146: syntax error: missing ')' before identifier 'callback' [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(572): error C2143: syntax error: missing ';' before '{' [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(572): error C2447: '{': missing function header (old-style formal list?) [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(577): error C2039: 'GCPrologueCallback': is not a member of 'v8::Isolate' [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote:
d:localuserprofile.node-gyp6.1.0includenodev8.h(5306): note: see declaration of 'v8::Isolate' remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(577): error C2065: 'GCPrologueCallback': undeclared identifier [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(577): error C2146: syntax error: missing ')' before identifier 'callback' [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(577): error C2143: syntax error: missing ';' before '{' [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(577): error C2447: '{': missing function header (old-style formal list?) [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(757): error C3083: 'smalloc': the symbol to the left of a '::' must be a type [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(757): error C2039: 'FreeCallback': is not a member of 'node' [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote:
D:localUserProfile.node-gyp6.1.0includenodenode_object_wrap.h(8): note: see declaration of 'node' remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(757): error C2061: syntax error: identifier 'FreeCallback' [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(761): error C2065: 'callback': undeclared identifier [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(761): error C2065: 'hint': undeclared identifier [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(768): error C2665: 'node::Buffer::New': none of the 4 overloads could convert all the argument types [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote:
D:localUserProfile.node-gyp6.1.0includenodenode_buffer.h(46): note: could be 'v8::MaybeLocal node::Buffer::New(v8::Isolate *,char *,size_t)' remote:
D:localUserProfile.node-gyp6.1.0includenodenode_buffer.h(34): note: or 'v8::MaybeLocal node::Buffer::New(v8::Isolate *,v8::Local,node::encoding)' remote:
D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(768): note: while trying to match the argument list '(v8::Isolate *, const char *, uint32_t)' remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(772): error C2440: 'return': cannot convert from 'v8::MaybeLocal' to 'v8::Local' [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote:
D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.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)npm3.8.6node_modulesnpmnode_modulesnode-gyplibbuild.js:276:23) remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(779): error C2039: 'Use': is not a member of 'node::Buffer' [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: gyp ERR! stack at emitTwo (events.js:106:13) remote:
D:localUserProfile.node-gyp6.1.0includenodenode_buffer.h(11): note: see declaration of 'node::Buffer' remote: gyp ERR! stack at ChildProcess.emit (events.js:191:7) remote: D:homesitewwwrootnode_modulesnode-icu-charset-detectornode_modulesnannan.h(779): error C3861: 'Use': identifier not found [D:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-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:homesitewwwrootnode_modulesnode-icu-charset-detectorbuildnode-icu-charset-detector.vcxproj] remote: gyp ERR! System Windows_NT 6.2.9200 remote: gyp ERR! command "D:Program Files (x86)nodejs6.1.0node.exe" "C:Program Files (x86)npm3.8.6node_modulesnpmnode_modulesnode-gypbinnode-gyp.js" "rebuild" remote: gyp ERR! cwd D:homesitewwwrootnode_modulesnode-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:node-icu-charset-detector@0.1.0 node-icu-charset-detector@0.1.0 install: node-gyp rebuild remote: npm WARN install:node-icu-charset-detector@0.1.0 Exit status 1 remote: Finished successfully. remote: Running post deployment command(s)... remote: Deployment successful.

Aucun commentaire:

Enregistrer un commentaire