Reputation: 3542
I'm using Intellij Idea 15.0.3. I tried to use it to develop a MEAN stack application.
I first File -> New -> Project -> Empty Project
to create an empty project. Then in Intellij Idea's terminal I type npm init -y
, a package.json
is generated. However, when I tried to edit this generated package.json
, a window pops up, saying: These files do not belong to the project
, and asks me if I want to edit it anyway.
Also, after I edited the package.json
, I run npm install
in the terminal, a new directory node_modules
is generated, but it's not shown in the Intellij Idea.
How can I add package.json
and node_modules
into project? Do I have to manually created file or folder through Intellij Idea project UI and give up using its terminal?
Upvotes: 1
Views: 1379
Reputation: 4486
You need to create a new project from existing source so..
File->New Project - Select HTML5/Javascript application then select one of the options at the bottom with "Existing Sources" at the end of it, you then just specify the folder that it's already and in and you should be good to go.
Upvotes: 2