itinance / itinance/react-native-fs
ERROR in ./~/react-native-fs/FS.common.js Unexpected token (28:29),.. You may need an appropriate loader to handle this file type.
- Dominant language
- C++
- Stars
- 5k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Whenever i try to load module in react, my webpack throw the following error:
`ERROR in ./~/react-native-fs/FS.common.js
Module parse failed: .../node_modules/react-native-fs/FS.common.js Unexpected token (28:29)
You may need an appropriate loader to handle this file type.
| };
|
| var normalizeFilePath = (path: string) => (path.startsWith('file://') ? path.slice(7) : path);
|
| type MkdirOptions = {`
i have tried to exclude the module from webpack, the issue still persists
` {
test: /\.js?/,
include: path.resolve(__dirname, '..', 'assets', 'app'),
exclude: path.resolve(__dirname, '../node_modules/react-native-fs/'),
loader: 'babel-loader',
options: {
presets: ['react', 'env', 'stage-2']
}
`
React:
`var fs = require('react-native-fs');`
react: 15.6.2
webpack: 2.2.1
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.