Unexpected character '#'
See original GitHub issueWhen I try to require sqlite3 I got error:
ERROR in ./~/sqlite3/~/rc/index.js
Module parse failed: .../node_modules/sqlite3/node_modules/rc/index.js Unexpected character '#' (1:0)
You may need an appropriate loader to handle this file type.
| #! /usr/bin/env node
| var cc = require('./lib/utils')
| var join = require('path').join
@ ./~/sqlite3/~/node-pre-gyp/lib/publish.js 14:13-26
@ ./~/sqlite3/~/node-pre-gyp/lib ^\.\/.*$
@ ./~/sqlite3/~/node-pre-gyp/lib/node-pre-gyp.js
@ ./~/sqlite3/lib/sqlite3.js
@ ./spec/videopage.js
@ ./spec/index.js
@ multi webpack-hot-middleware/client babel-polyfill ./spec/index.js
Webpack config:
resolve: {
extensions: [
'.js', '.jsx', '.css', 'json'
],
modules: ['node_modules']
},
node: {
fs: "empty",
dns: "empty",
net: "empty",
tls: "empty",
"child_process": "empty"
},
module: {
rules: [
{
test: /\.json$/,
loader: 'json-loader'
}, {
test: /\.js$/,
use: 'babel-loader',
include: [
path.join(__dirname, '../components'),
path.join(__dirname, '../spec')
]
}
...
.babelrc
"presets": ["es2015", "stage-0", "react"]
...
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Unexpected Character - TV Tropes
They could be a One-Scene Wonder, someone who had succumbed to Chuck Cunningham Syndrome, simply a Living Prop, a Joke Character, or even...
Read more >1:1 error Parsing error: Unexpected character ' ' - Stack Overflow
It look like UTF-8 BOM in the begin of your file. If you have notepad++ you can remove it by click to "Encoding"...
Read more >Unexpected CHARACTER - Episode Support
"Unexpected CHARACTER". This error means the line of code before your character dialogue has an error. · "Unexpected CHARACTER or Scene change".
Read more >ParseError: Unexpected character '@' #15832 - GitHub
I'm getting this parsing error (i.e., error Unexpected character '@' ParseError ) returned when running eslint --cache --fix .
Read more >Unexpected character encountered while parsing value
Unexpected character encountered while parsing value: P. Path '', line 0, position 0. Question. Reactive. API. Application Type. Reactive.
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 is not a Babel issue. See https://github.com/JavascriptIsMagic/shebang-loader and https://github.com/webpack/webpack/issues/2168
Oh what I mean is you should do something like