Cannot read property '0' of null
Closed this issue · 2 comments
Cleanshooter commented
I tried to add this to my babel config to provide scss file support but I get the following error:
\src\App.js: Cannot read property '0' of null
at PluginPass.ImportDeclaration (C:\app\node_modules\babel-plugin-transform-scss\lib\index.js:33:33)
***MORE***
babel.config.json
{
"presets":[
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
["@babel/transform-runtime"],
[
"module-resolver", {
"root": ["./client/src"]
}
],
["@babel/plugin-proposal-class-properties"],
["inline-react-svg"],
["css-modules-transform"],
["file-loader"],
["babel-plugin-transform-scss"]
]
}
package.json
{
"name": "app",
"version": "0.0.1",
"description": "App built with the MERN stack",
"main": "server.js",
"scripts": {
"start": "concurrently \"npm run server\" \"npm run client\"",
"server": "node ./bin/www",
"client": "npm start --prefix client",
"dev": "concurrently \"npm run devserver\" \"npm run client\"",
"devserver": "nodemon ./bin/www --ext js",
"test": "nyc --reporter=lcov mocha ./tests/tests.js --timeout 10000 --exit",
"broken-test": "nyc --reporter=lcov mocha -r jsdom-global/register -r @babel/register ./tests/tests.js ./client/src/**/*.test.js --timeout 10000 --exit"
},
"license": "MIT",
"dependencies": {
...
},
"devDependencies": {
"@babel/cli": "^7.13.10",
"@babel/core": "^7.13.10",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-transform-runtime": "^7.13.10",
"@babel/preset-env": "^7.13.10",
"@babel/preset-react": "^7.12.13",
"@babel/register": "^7.13.8",
"@babel/runtime": "^7.13.10",
"babel-plugin-css-modules-transform": "^1.6.2",
"babel-plugin-inline-react-svg": "^2.0.1",
"babel-plugin-module-resolver": "^4.1.0",
"babel-plugin-transform-scss": "^1.0.9",
"chai": "^4.2.0",
"chai-http": "^4.3.0",
"eslint-plugin-ndp": "file:eslint",
"jsdom": "16.5.1",
"jsdom-global": "3.0.2",
"mocha": "^8.1.3",
"nodemon": "^2.0.7",
"nyc": "^15.1.0",
"sinon": "^9.2.3",
"sinon-chai": "^3.5.0"
}
}
mecharmor commented
@Cleanshooter are you using scss modules?? I wonder if this error happens because of that. It would be nice to have some clarification in the docs if modules are explicitly unsupported
altgifted commented
release 1.0.10 was happened with those changes