最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Unterminated string literal.ts(1002) - Stack Overflow

programmeradmin3浏览0评论

I tried to add "react-native-css-gradient" but I got this error.

import Gradient from 'react-native-css-gradient`; // Here <--- Unterminated string literal.ts(1002) 

import React, {Component} from 'react';
import {StyleSheet, Text, View, TextInput, Image,} from 'react-native';

export default class App extends Component {
  render() {
     return (

I tried to add "react-native-css-gradient" but I got this error.

import Gradient from 'react-native-css-gradient`; // Here <--- Unterminated string literal.ts(1002) 

import React, {Component} from 'react';
import {StyleSheet, Text, View, TextInput, Image,} from 'react-native';

export default class App extends Component {
  render() {
     return (
Share Improve this question asked Apr 17, 2019 at 18:07 Samet GündüzSamet Gündüz 731 silver badge4 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

You have accidentally put in a bad backtick character instead of a single quote.

backtick: ` single quote: '

That first line should be:

import Gradient from 'react-native-css-gradient';

Should be a quick fix.

发布评论

评论列表(0)

  1. 暂无评论