Coder Social home page Coder Social logo

Comments (3)

kdchang avatar kdchang commented on April 24, 2024

@PokimLee 請問使用 react-router-example 範例前是否有先執行 npm install 安裝套件呢?

下面是目前 package.json ,有設定 npm start ,也可以正常執行喔!方便分享你的錯誤訊息截圖嗎?謝謝~

{
  "name": "react-router-example",
  "version": "1.0.0",
  "description": "",
  "main": "webpack.config.js",
  "scripts": {
    "start": "webpack-dev-server --colors --inline --content-base ."
  },
  "author": "kdchang",
  "license": "MIT",
  "dependencies": {
    "react": "^15.3.1",
    "react-dom": "^15.3.1",
    "react-router": "^2.7.0"
  },
  "devDependencies": {
    "babel-core": "^6.13.2",
    "babel-eslint": "^6.1.2",
    "babel-loader": "^6.2.5",
    "babel-preset-es2015": "^6.13.2",
    "babel-preset-react": "^6.11.1",
    "eslint": "^3.3.1",
    "eslint-config-airbnb": "^10.0.1",
    "eslint-loader": "^1.5.0",
    "eslint-plugin-import": "^1.13.0",
    "eslint-plugin-jsx-a11y": "^2.1.0",
    "eslint-plugin-react": "^6.1.2",
    "html-webpack-plugin": "^2.22.0",
    "webpack": "^1.13.2",
    "webpack-dev-server": "^1.14.1"
  }
}

from reactjs101.

PokimLee avatar PokimLee commented on April 24, 2024

我在跟着教程进行Ch07 redux範例练习。
在使用跟范例同一个package.json的情况下,亦进行了npm i 的命令,但还是提示有错哦:(

在进行npm start后报错截图:

在编译器上报错提示找不到Main模块

ps.项目文件已发送到你的邮箱[email protected]

from reactjs101.

kdchang avatar kdchang commented on April 24, 2024

@PokimLee 您好

由於為了讓引入模組(module)路徑更為簡潔,所以有使用 index.js 檔案於 Main 資料夾下,內容:
export { default } from './Main'; ,不知道是否建立呢?

從零開始學 ReactJS(ReactJS 101)

可以參考看看 完整範例程式碼 剛剛測試應該是可以運行的,若有問題歡迎提出討論,謝謝您!

from reactjs101.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.