Unexpected character error
See original GitHub issueHello,
I’m trying to add this plugin to my codebase, but a error keeps popping up. Have you had this issue before?
Error: SyntaxError: Unexpected character '�' while parsing file: /Users/matiss/personal/property-crawler/list-crawler/node_modules/iconv/build/Release/iconv.node (line: 1, col: 0, pos: 0)
Error
at new JS_Parse_Error (eval at <anonymous> (/Users/matiss/personal/property-crawler/list-crawler/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:1545:18)
at js_error (eval at <anonymous> (/Users/matiss/personal/property-crawler/list-crawler/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:1553:11)
at parse_error (eval at <anonymous> (/Users/matiss/personal/property-crawler/list-crawler/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:1677:9)
at Object.next_token [as input] (eval at <anonymous> (/Users/matiss/personal/property-crawler/list-crawler/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:1949:9)
at next (eval at <anonymous> (/Users/matiss/personal/property-crawler/list-crawler/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2078:25)
at Object.parse (eval at <anonymous> (/Users/matiss/personal/property-crawler/list-crawler/node_modules/uglify-js/tools/node.js:28:1), <anonymous>:2064:15)
at addFile (/Users/matiss/personal/property-crawler/list-crawler/node_modules/uglify-js/tools/node.js:71:33)
at /Users/matiss/personal/property-crawler/list-crawler/node_modules/uglify-js/tools/node.js:80:17
at Array.forEach (native)
at Object.exports.minify (/Users/matiss/personal/property-crawler/list-crawler/node_modules/uglify-js/tools/node.js:78:26)
at Stream.ready (/Users/matiss/personal/property-crawler/list-crawler/node_modules/uglifyify/index.js:71:19)
at Stream.<anonymous> (/Users/matiss/personal/property-crawler/list-crawler/node_modules/uglifyify/index.js:97:12)
at _end (/Users/matiss/personal/property-crawler/list-crawler/node_modules/through/index.js:65:9)
at Stream.stream.end (/Users/matiss/personal/property-crawler/list-crawler/node_modules/through/index.js:74:5)
at DestroyableTransform.onend (/Users/matiss/personal/property-crawler/list-crawler/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:495:10)
at DestroyableTransform.g (events.js:291:16)
at emitNone (events.js:91:20)
at DestroyableTransform.emit (events.js:185:7)
at endReadableNT (/Users/matiss/personal/property-crawler/list-crawler/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:865:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)
at module.exports.logError.errorHandlingError (/usr/local/lib/node_modules/serverless/lib/classes/Error.js:82:11)
at BbPromise.resolve.then.catch.e (/usr/local/lib/node_modules/serverless/bin/serverless:20:15)
at tryCatcher (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:510:31)
at Promise._settlePromise (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromise0 (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:612:10)
at Promise._settlePromises (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:687:18)
at Async._drainQueue (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:138:16)
at Async._drainQueues (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:148:10)
at Immediate.Async.drainQueues (/usr/local/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:574:20)
at tryOnImmediate (timers.js:554:5)
at processImmediate [as _immediateCallback] (timers.js:533:5)
Here’s my package.json dependencies
{
"dependencies": {
"aws-sdk": "^2.7.6",
"babel-preset-es2015": "^6.18.0",
"crawler": "git://github.com/bda-research/node-crawler.git#1.0.0-beta",
"q": "^1.4.1",
"serverless-plugin-optimize": "git://github.com/FidelLimited/serverless-plugin-optimize.git#master"
},
"devDependencies": {}
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Error parsing json, unexpected character
it means that instead of JSON response from LiveAgent API, the client application in browser received something that is not JSON.
Read more >[Solved] Unexpected character (at character) Error in Flutter
In this post, we are going to show you how to solve "Unexpected character (at character)" error in Flutter/Dart. This error usually happens...
Read more >Unexpected Character ERROR, HELP! - Episode Forums
So while I was still writing out my story and there's the part where I was doing choices for outfits, makeup, and hairstyle....
Read more >Parsing error: Unexpected character ' ' from react file [duplicate]
I got this error from index.js file it's a create-react-app project. here is the error: ERROR in ./src/index.js Module build failed (from ....
Read more >unexpected character error while deploying the template #10
DeploymentConfig.Spec: v1.DeploymentConfigSpec.Replicas: readUint32: unexpected character: , error found in #10 byte of ...|eplicas":" ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This one still happens to me with the sharp module. I have tried setting ignore to the .node file but it did not help. Setting minify to false changes the output to:
Unexpected character ''
with no additional traceback info - I have tried setting SLS_DEBUG and debug as well and nothing more shows up.
@dwolfand Check if the problem is due to global was not being set in babelify. PR #14 solved this and I just published it now to npm. NPM update to version rc7.
@cryptoquick I will be including browserify options
extensions
array that you will be able to add other extensions besides.js
and.json
.